package com.css.zfzx.sjcj.common.spacedata;

import org.geotools.geometry.jts.JTS;
import org.geotools.geometry.jts.JTSFactoryFinder;
import org.geotools.referencing.CRS;
import org.geotools.referencing.crs.DefaultGeographicCRS;
import org.locationtech.jts.geom.Coordinate;
import org.locationtech.jts.geom.Geometry;
import org.locationtech.jts.geom.GeometryFactory;
import org.locationtech.jts.io.ParseException;
import org.locationtech.jts.io.WKTReader;
import org.opengis.referencing.crs.CoordinateReferenceSystem;
import org.opengis.referencing.operation.MathTransform;

import java.io.*;

public class ProjectTransUtil {

    private static GeometryFactory geometryFactory = JTSFactoryFinder.getGeometryFactory(null);
    private static WKTReader reader = new WKTReader(geometryFactory);

    private static String strWKTMercator = "PROJCS[\"Krasovsky_1940_Albers\"," +
            "GEOGCS[\"GCS_Krasovsky_1940\"," +
            "DATUM[\"D_Krasovsky_1940\"," +
            "SPHEROID[\"Krasovsky_1940\",6378245.0,298.3]]," +
            "PRIMEM[\"Greenwich\",0.0]," +
            "UNIT[\"Degree\",0.0174532925199433]]," +
            "PROJECTION[\"Albers\"]," +
            "PARAMETER[\"False_Easting\",0.0]," +
            "PARAMETER[\"False_Northing\",0.0]," +
            "PARAMETER[\"Central_Meridian\",105.0]," +
            "PARAMETER[\"Standard_Parallel_1\",25.0]," +
            "PARAMETER[\"Standard_Parallel_2\",47.0]," +
            "PARAMETER[\"Latitude_Of_Origin\",0.0]," +
            "UNIT[\"Meter\",1.0]]";


    public static void setStrWKTMercator(String wKTMercator){
        strWKTMercator = wKTMercator;
    }

    /**
     * 经纬度转WEB墨卡托
     * @param geom
     * @return
     */
    public static Geometry lonlat2WebMactor(Geometry geom){
        try{
            //CoordinateReferenceSystem crsTarget = CRS.parseWKT(strWKTMercator);
            CoordinateReferenceSystem crsTarget = CRS.decode("EPSG:3857");
            // 投影转换
            MathTransform transform = CRS.findMathTransform(DefaultGeographicCRS.WGS84, crsTarget);
            return JTS.transform(geom, transform);
        }
        catch (Exception e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
            return null;
        }
    }

    public static Geometry webMactor2Lonlat (Geometry geom){
        try{
            CoordinateReferenceSystem sourceTarget = CRS.parseWKT(strWKTMercator);
            /*CoordinateReferenceSystem crsTarget = CRS.decode("EPSG:4326");
            MathTransform transform = CRS.findMathTransform(sourceTarget, crsTarget, true);*/
            //MathTransform transform = CRS.findMathTransform(sourceTarget, DefaultGeographicCRS.WGS84, true);
            CoordinateReferenceSystem crsTarget = CRS.decode("EPSG:4490");
            MathTransform transform = CRS.findMathTransform(sourceTarget, crsTarget,true);
            Geometry resSource=JTS.transform(geom, transform);
            String str=resSource.toString();
            //str="MULTIPOLYGON (((41.00000011596755 77.99999999388695, 41.00000011190918 78.05759711226416, 40.99943888993435 78.05906388200003, 40.99928888993434 78.05952221500007, 40.99918055593434 78.06055554800008, 40.999261111934324 78.06097221500006, 40.999427778934304 78.06148332600003, 40.99974722293432 78.06189165900008, 41.0000001115983 78.06200923054297, 41.000000108915046 78.10009050427283, 40.999522222934374 78.10106666000019, 40.99899722293444 78.10237777100008, 40.99853333393433 78.10401110400011, 40.99841111193432 78.1046444380001, 40.99839722293437 78.10520832600002, 40.998466667934316 78.10573888200008, 40.9985805559343 78.10598888300008, 40.99888055693439 78.10625832600005, 40.999141667934374 78.10628610400005, 40.99943888993446 78.10619721500007, 40.99969166793442 78.10599721500006, 40.99990555593438 78.10577221500006, 41.00000010852914 78.10556735372379, 41.00000010033296 78.22188909137476, 40.99909166793434 78.22034721700004, 40.99700555693429 78.21731666200003, 40.99575555693433 78.21511388400006, 40.99508333393432 78.21361110600003, 40.994647222934326 78.21221388400005, 40.9943999999343 78.21126666100008, 40.994180555934314 78.20978332800007, 40.992994445934315 78.20964443900004, 40.9916027789343 78.20899444000008, 40.989697222934296 78.20762221700005, 40.98764444493428 78.20539999500005, 40.98540277893424 78.20287221700005, 40.983588888934236 78.20085832800004, 40.982277778934275 78.19917499500008, 40.98168055593426 78.19772499500004, 40.981341666934235 78.19661388300005, 40.981297222934266 78.19559999500007, 40.98147500093423 78.19374999500006, 40.98146666693427 78.19273332900008, 40.98116666793427 78.19215277200004, 40.98086944493424 78.19177221700005, 40.98035277793425 78.19148332800005, 40.97968333393426 78.19139721700002, 40.97912222293423 78.19120555100007, 40.97875000093423 78.19082499500007, 40.978450000934245 78.19009443900006, 40.97825833393421 78.18908055000004, 40.97799444493421 78.18806388400003, 40.9776222229342 78.18734443900007, 40.97706111193424 78.18652777200003, 40.9767222229342 78.18594721700003, 40.97660555593421 78.18517499500007, 40.976841666934206 78.18418332800006, 40.97768333393424 78.18265555000005, 40.97830277793424 78.18153610500009, 40.97883611193426 78.18070277200007, 40.97959166693421 78.17952221700006, 40.98071944493424 78.17808055000006, 40.98202222293425 78.1765888830001, 40.98279444493422 78.17571943900003, 40.98358611193429 78.17423610600008, 40.984313889934285 78.17187499400006, 40.984875000934245 78.17018332800006, 40.98556388993424 78.16843888300006, 40.98620277893427 78.16735277300006, 40.98670555593428 78.16640555000004, 40.98709166693431 78.16560832700003, 40.98731388993428 78.16512221600004, 40.9876333339343 78.16434999400009, 40.98798055593426 78.16372499400006, 40.9878083339343 78.16308054900003, 40.987516667934294 78.16250832700007, 40.986930555934286 78.16226666100006, 40.98649722293429 78.16239721700003, 40.98577222293424 78.16284721700005, 40.98514444593427 78.16361943900006, 40.98406388993428 78.16598055000003, 40.98360555693425 78.16589443900007, 40.98334999993425 78.16590277200004, 40.98305000093424 78.16599721700005, 40.98257500093424 78.16624999400005, 40.98216944593425 78.16668332800003, 40.98198333393426 78.16707499500006, 40.98191388893426 78.16770832700007, 40.981844444934225 78.16834166100006, 40.98155277893423 78.16935832800006, 40.981188889934245 78.17043332700007, 40.98104166693425 78.17101666100007, 40.98097222293425 78.17135555000004, 40.98104722293428 78.17184166100003, 40.98112500093427 78.17203055100003, 40.98136388993427 78.17263888400004, 40.980955556934276 78.17318610600006, 40.980069444934216 78.17386388300008, 40.979180556934246 78.17436666100008, 40.97866666693422 78.17468888300006, 40.97773055593422 78.17570277200008, 40.97692222293421 78.17710832700004, 40.97603333393426 78.17874999500003, 40.97484444493419 78.18005277200005, 40.97410277793419 78.18058055000004, 40.97323333393422 78.18105832800006, 40.972722222934216 78.18139721600006, 40.97173611193418 78.18236110600003, 40.97107222293423 78.18280277300005, 40.9704527779342 78.18308055000006, 40.969786111934205 78.18314166100004, 40.969327777934176 78.18293332800005, 40.96886666793418 78.18233610600004, 40.96802500093419 78.18098888400004, 40.9668500009342 78.17882777300008, 40.96579444493415 78.17633610600006, 40.96216666793418 78.16811666100006, 40.961325000934146 78.16601666100007, 40.96078888893418 78.16411388400007, 40.96040000093413 78.16236110600005, 40.960113888934174 78.16062499500003, 40.959797222934164 78.15919166100008, 40.95948055593418 78.15842777200004, 40.95900555593412 78.15776943900005, 40.958455555934144 78.15721388400004, 40.95778611193416 78.15645832700005, 40.95719166693416 78.15544166000005, 40.956274999934145 78.15348054900005, 40.95544166793412 78.15126666000003, 40.95479722293414 78.14957499400003, 40.95426111193411 78.14811666100007, 40.953675000934155 78.14709999400003, 40.952691666934136 78.14564166100007, 40.95056111193411 78.14196943800003, 40.949283333934076 78.13976666100007, 40.94857777893411 78.13789999400007, 40.9480611119341 78.13578055000005, 40.94766111193409 78.13370554900007, 40.94744444593411 78.13148332700007, 40.94730000093407 78.12923610500007, 40.947330555934094 78.12775277200008, 40.94731666693409 78.12676110500007, 40.947119444934096 78.12571943800003, 40.94639444493411 78.12467777200004, 40.944905555934064 78.12303054900008, 40.9435638899341 78.12180555000002, 40.94298055593409 78.12082499400003, 40.94282222293408 78.12045277200008, 40.94274444493409 78.12000832700005, 40.942708334934096 78.11963610500004, 40.942730555934084 78.11879443800007, 40.942852777934064 78.11804721600004, 40.943022222934104 78.11722221600006, 40.94308055593406 78.11638054900004, 40.9430611119341 78.11580832700008, 40.9429555559341 78.11529443800005, 40.942713889934076 78.11479999400007, 40.942430556934035 78.11436666000003, 40.94182222293404 78.11378610500003, 40.941027778934036 78.11309999300005, 40.94046944593408 78.11227499400007, 40.93995277793408 78.11104999300005, 40.93933611193403 78.10950554900006, 40.93882500093406 78.10855832700008, 40.938102777934034 78.10776110500008, 40.93581666693404 78.10533054800004, 40.93439166693404 78.10370554900004, 40.931072222934034 78.0995222160001, 40.92941111193399 78.09721388200006, 40.927863888933985 78.09478332600008, 40.92679722293399 78.09251666000006, 40.925369444934 78.08854999400008, 40.92482222293398 78.08610277100007, 40.924313889934 78.0833944380001, 40.92386388993398 78.08101666000005, 40.92432222293398 78.08081666000004, 40.92476666693398 78.08060832600006, 40.92512500093398 78.08031388200003, 40.92533888993397 78.07993888100003, 40.925383333933986 78.07966943800005, 40.92533888993397 78.07944443700006, 40.925213889934 78.07925277100003, 40.924730555933984 78.07909721500005, 40.924172222933954 78.07900277100002, 40.923380555933974 78.07908054900008, 40.92296388993399 78.07631943700005, 40.92253888993399 78.07420277100005, 40.922138889933976 78.07198888200007, 40.92203888993399 78.07015554900006, 40.92206666693396 78.06820277100007, 40.92219166793397 78.06662221500004, 40.922702778934 78.06448888100005, 40.923055555933985 78.06298610400006, 40.92381944593397 78.05969721500003, 40.924458333934005 78.05683054800006, 40.92464722293396 78.05533888100007, 40.92467500093396 78.05376665900008, 40.92454444493397 78.05253610400007, 40.92408333393397 78.05074721500006, 40.923463889933984 78.04909721500007, 40.922452778933945 78.04634443700007, 40.92103611193395 78.04232777000004, 40.919644444934 78.03792499200006, 40.91911111193397 78.03601665800005, 40.918850000933965 78.03499999300004, 40.91872499993395 78.03392499300008, 40.918566666933955 78.03288332600005, 40.918169444933945 78.03161388100006, 40.91770833393395 78.03018332600004, 40.91724722293397 78.02874165800006, 40.917030555933934 78.02706665800008, 40.916811111933974 78.02555554700007, 40.916627778933965 78.02463610300002, 40.91637500093396 78.02406388100006, 40.91617222293395 78.02391388000007, 40.91578055593398 78.02388888100006, 40.91550833493392 78.02392499200005, 40.91522222293395 78.02416665900006, 40.91489722293392 78.02466943700006, 40.91450555593394 78.02546943700007, 40.913994444933955 78.02599721400003, 40.913547222933914 78.02631943600005, 40.913000000933934 78.02644165900006, 40.91253611193393 78.02644165900006, 40.912052778933955 78.02643332500007, 40.91165833393392 78.02630276900004, 40.91128611193391 78.02605832500006, 40.911050000933905 78.02573054700008, 40.910919445933914 78.02533054800006, 40.910850000933905 78.02482777000006, 40.910850000933905 78.02420277000004, 40.91089444493392 78.02381110300007, 40.91108611193395 78.02318610300006, 40.911597222933935 78.02236110300004, 40.912022222933935 78.02164999200005, 40.912361111933926 78.02076388100005, 40.91261666793393 78.02008610300004, 40.91289444493394 78.01948888000004, 40.91351666793395 78.01841110300006, 40.914422222933915 78.01709165900007, 40.91497777793393 78.01577221400004, 40.91529444493392 78.01414999200006, 40.91545277793393 78.01223888100003, 40.91552500093395 78.01075554800006, 40.91552222293393 78.00938332500004, 40.915511111933945 78.00736943600003, 40.915508333933936 78.00615554700006, 40.91563055593395 78.00489721400002, 40.91607777893394 78.00309999200005, 40.91636666793392 78.00000000100003, 40.91636666937166 77.99999999395231, 40.94988610835769 77.99999999392612, 40.949886110934116 78.00000000000004, 40.95072499993409 78.00168332500004, 40.95150277793413 78.00528610300005, 40.95183055593412 78.00866388100007, 40.95220555593409 78.01304721400004, 40.95230833393414 78.01606665900006, 40.95263333393411 78.01998332500004, 40.952824999934144 78.02276110300005, 40.95297222293414 78.02614721400005, 40.9527999999341 78.02792499200007, 40.95257777793411 78.02917499200004, 40.9518666679341 78.03184999200005, 40.95105000093412 78.03434165900006, 40.95071666793409 78.03546110300005, 40.9504638889341 78.03684999200004, 40.950555555934095 78.03834999300005, 40.95064722293409 78.04002499200004, 40.951119444934136 78.04285554800002, 40.952152778934135 78.04735277000003, 40.95262500093413 78.04985277000003, 40.95316944593413 78.05271666000006, 40.95365555593413 78.05463610400004, 40.95408333393414 78.05571943700005, 40.95445000093413 78.05642499300006, 40.95477499993411 78.05679721500007, 40.95512499993415 78.05691943700003, 40.95544722293415 78.05687499300006, 40.95573333393414 78.05661388100003, 40.955888889934116 78.05619721500005, 40.956008333934136 78.05523332500007, 40.95602777793415 78.05418332500007, 40.95604722293412 78.05318610400008, 40.95606388993412 78.05201388100005, 40.95608888993412 78.05084166000006, 40.95608611193411 78.05025277000004, 40.956127777934135 78.04987777100007, 40.956186110934105 78.04952221500008, 40.95630555693413 78.04923610300004, 40.95645000093415 78.04923610300004, 40.95654166793414 78.04934999300008, 40.95666666693412 78.04977499200002, 40.95679722293411 78.05076388100008, 40.95700555593415 78.05149443700003, 40.957208333934105 78.05198054800007, 40.95753888993411 78.05233610300009, 40.95790277893415 78.05244721400004, 40.95831944493412 78.05246666000005, 40.95857222293413 78.05238610400004, 40.95891111193417 78.05207499200003, 40.95916111193416 78.05164999300007, 40.959349999934126 78.0506333260001, 40.95954444493416 78.04791666000006, 40.959558333934154 78.04626665900008, 40.959419444934134 78.04394166000003, 40.95921111193416 78.04247499300004, 40.95895833393414 78.04055554800004, 40.95885833393417 78.03814165900008, 40.95890277893413 78.03676110300006, 40.95907222293416 78.03486943700005, 40.95922222293413 78.03256943600007, 40.95940000093415 78.02925276900002, 40.95961944493414 78.02659721400005, 40.960000000934116 78.02438332600008, 40.960441666934166 78.02268332500006, 40.96066111193413 78.02127499300008, 40.960994445934126 78.01968888100002, 40.96124166793417 78.01857777000002, 40.96148888993417 78.01747499200007, 40.96179166693417 78.01651110300008, 40.96219166793417 78.01553888100005, 40.961424999934195 78.01314165800004, 40.96034166793418 78.00970554700007, 40.95971666793415 78.00723888000005, 40.95948333393412 78.00545277000003, 40.95892500093416 78.00000000000004, 40.9589249992887 77.99999999391905, 41.00000011596755 77.99999999388695)), ((40.92412777893399 78.02394165900006, 40.92427499993396 78.02488610400009, 40.924622222933976 78.02597221400003, 40.92499444493397 78.02653610300005, 40.925516666934016 78.02705832500003, 40.92611944493398 78.02742221400008, 40.92672222293402 78.02756943600008, 40.927694444934 78.02751665900007, 40.92841111093401 78.02731665900005, 40.92976111193401 78.02662221400004, 40.93087777893403 78.02596388100005, 40.93161944493399 78.02542499200007, 40.93205000093401 78.02492221400007, 40.93239166693403 78.02431388100007, 40.932561111934 78.02359443600007, 40.93250000093402 78.02296110300004, 40.932269444934015 78.02228332500005, 40.93198333393403 78.02186665900005, 40.931580555934005 78.02150276900005, 40.93094722293401 78.02101665800006, 40.92988333393403 78.02058054700005, 40.928619444934 78.02040832600005, 40.927244444934 78.02050277000006, 40.92675277893396 78.02062499300007, 40.926094445933984 78.02071110300005, 40.92537777893397 78.02094721400005, 40.924777778934 78.02144165900006, 40.92443611193396 78.02178888100008, 40.924205555933995 78.02228332500005, 40.92409166793401 78.02296110300004, 40.92412777893399 78.02394165900006)), ((40.96888055593424 78.09316943700003, 40.96970833393433 78.09481666000016, 40.97029444493424 78.09580832700004, 40.9706555559342 78.09682221500009, 40.97087222293427 78.09756943700012, 40.97116666793417 78.0993499940001, 40.9714888899342 78.10078888200013, 40.97185000093433 78.10219721500005, 40.97251666793417 78.10388054900004, 40.97313333393423 78.10531388300019, 40.974369444934254 78.10837777200008, 40.97534722293419 78.11083332700015, 40.97598888993422 78.11269166100004, 40.97626666693424 78.11376666000012, 40.977213889934156 78.11625832700014, 40.97824722293433 78.11909721600011, 40.97919722293421 78.12209166100013, 40.98003055693427 78.12458332700004, 40.980933334934164 78.12829999400003, 40.98165000093436 78.13110277100004, 40.98262500093434 78.13443610600001, 40.98341111193432 78.13651110500001, 40.98451388993423 78.13894166100005, 40.98572500093438 78.14168332800017, 40.986930555934386 78.14529443800014, 40.98809444593439 78.14894999400008, 40.98891388893429 78.15091943800013, 40.989777778934354 78.15292499500009, 40.99061944593427 78.15432221700007, 40.99118611193427 78.15505277200003, 40.99157499993425 78.15523332700013, 40.991844444934266 78.15523332700013, 40.99208888993435 78.15506943900004, 40.99223611193424 78.154688883, 40.99247500093441 78.15391388300003, 40.992591666934295 78.1529527730001, 40.99278333393427 78.15202221600009, 40.99290000093443 78.15158055000012, 40.99324166693443 78.15122499400002, 40.99346388993423 78.15124999400011, 40.99368055593444 78.15140554900012, 40.994175000934405 78.15209999400012, 40.99497777893438 78.15399443900014, 40.99560000093433 78.15578055000003, 40.995847222934366 78.1563361050001, 40.99609444493441 78.15681388300015, 40.9963722229343 78.15701388299999, 40.99667500093429 78.15704999400009, 40.99698333393432 78.15700555000012, 40.99728611193431 78.1566833280001, 40.99758611193446 78.15591943900006, 40.997702778934446 78.15463610500012, 40.99766944493437 78.15383610600007, 40.997477778934275 78.15288332700004, 40.99695277893435 78.15140555000005, 40.996302777934346 78.14989721600011, 40.99537222293432 78.14795277200017, 40.99415833393432 78.14573054900006, 40.993497222934444 78.14428888300017, 40.992869444934364 78.14229999399998, 40.992452777934275 78.14030277200014, 40.99208888893441 78.137569439, 40.99149444593434 78.13546110499999, 40.990847222934356 78.13334999400007, 40.9903861119343 78.13209166100012, 40.98975277893442 78.13090277200007, 40.988849999934416 78.12979166000014, 40.987405555934224 78.1280916610001, 40.98648888893432 78.1274833280001, 40.98600277893426 78.12718888299997, 40.98556944493427 78.12686666100018, 40.98536388993424 78.12660554900003, 40.985202778934344 78.12594721600003, 40.98506944493429 78.12532221500008, 40.98470555593432 78.12421110499997, 40.984052777934295 78.1226999930002, 40.983458333934294 78.12164999400011, 40.98292222293427 78.1210249940001, 40.98235555593438 78.12040832700012, 40.98197500093423 78.11973054900017, 40.98124999993435 78.11788332800018, 40.980538888934255 78.11573888200002, 40.97949722293436 78.11325554900003, 40.97864722293417 78.11168332700015, 40.97764444493436 78.10951388300003, 40.9766666669343 78.1070499930001, 40.97598888993422 78.10527777100003, 40.97536944593434 78.10291666000012, 40.97483888993428 78.10122499300007, 40.974341667934176 78.09937499300014, 40.97383333393422 78.09664999400013, 40.97361666793425 78.09465277200015, 40.973419444934144 78.0913194380002, 40.97315555593426 78.08954999300005, 40.97286111193425 78.08804721500006, 40.97246666693421 78.08709999300002, 40.97132500093422 78.08506943800013, 40.97040277893429 78.0837166600001, 40.969866666934166 78.08268332600005, 40.96947500093429 78.08182221500016, 40.96896666793426 78.08061666000016, 40.968636111934266 78.07946110400007, 40.9684583339343 78.07769166000008, 40.9684638899342 78.07567777100013, 40.96857222293422 78.07393332600014, 40.968666667934265 78.07283888100012, 40.96860277793412 78.07198054800006, 40.9684638899342 78.07116388200012, 40.968188889934154 78.07038332600001, 40.96792500093427 78.06997499300007, 40.96766111193421 78.0699138820001, 40.96742500093428 78.0699138820001, 40.967216667934174 78.07012221500021, 40.96706944593428 78.07056388200004, 40.96682222293414 78.07146665900007, 40.96677222293426 78.07203054899998, 40.96660555593429 78.07295277000003, 40.96636388993415 78.07423610300003, 40.96620277793415 78.07545277100019, 40.96612777893427 78.0777611040001, 40.96618611193419 78.07901943800016, 40.96635555593418 78.08021666000008, 40.96661388893416 78.08120554800017, 40.96725277793416 78.0832888830002, 40.96769166793424 78.08504443800001, 40.96785555593432 78.08658054800014, 40.96786944493432 78.0876138820002, 40.96779444493412 78.08901943700005, 40.96780277893431 78.08986110400012, 40.96784166693431 78.09066943800002, 40.967930556934235 78.09119721500008, 40.96826388993419 78.09200554900019, 40.96888055593424 78.09316943700003)), ((40.97668888893435 78.09399443800015, 40.97688333393415 78.09517499400016, 40.97713888993416 78.09611943800013, 40.97769444493423 78.09717777100002, 40.97821944493433 78.0979611050002, 40.978863888934214 78.09877499400011, 40.97963055693419 78.09979166000005, 40.98000000093424 78.10014721600015, 40.980302778934245 78.10029443800005, 40.98054722293423 78.10029443700016, 40.98078611193433 78.10005277100004, 40.98089722293418 78.0995388820001, 40.9809500009343 78.09847221600012, 40.98092777893426 78.09681388200005, 40.98071666793427 78.09425277100013, 40.980394444934355 78.09229166000017, 40.97997500093432 78.09016388200013, 40.97950555693434 78.08867221500007, 40.97903611193431 78.08753610400015, 40.97801111193423 78.08533888200003, 40.97764444493436 78.0846694380001, 40.977336111934335 78.08448054899998, 40.977036111934176 78.08448888200007, 40.97679722293423 78.08476666000013, 40.97665277893418 78.0857111040001, 40.976619444934265 78.08772499400015, 40.97655000093419 78.08985277100004, 40.97656666793426 78.09123332700004, 40.97658055593434 78.09237777100009, 40.97668888893435 78.09399443800015)), ((40.98303888993426 78.10904443800007, 40.98319444493425 78.11066943700007, 40.98342499993428 78.11216110500004, 40.98393611193424 78.11418332700003, 40.98457500093426 78.11586943800006, 40.98527222293425 78.11754443800004, 40.98577222293424 78.11845555000008, 40.98598888993427 78.11877499300003, 40.98631944493427 78.11908888300007, 40.98665000093426 78.11920277100006, 40.986888889934264 78.11914999400005, 40.9872138899343 78.11900277100005, 40.98761388993426 78.11856666100006, 40.987752778934286 78.11813332700007, 40.987822222934255 78.11766388200004, 40.98781666693429 78.11725832700007, 40.98777222293427 78.11654443800006, 40.98761388993426 78.11561666100006, 40.987347222934254 78.11464443800008, 40.98693611193424 78.11360277100005, 40.98643611193426 78.11258610400007, 40.985355555934284 78.11038332600003, 40.98474444493426 78.10925277100006, 40.98418333393428 78.10824721500006, 40.98381111193427 78.1078305490001, 40.98344166793428 78.10765554900006, 40.983216666934275 78.10764721600003, 40.98310277893424 78.10775277100004, 40.98302500093425 78.10789999300005, 40.98300833493424 78.10817777200003, 40.98303888993426 78.10904443800007)), ((40.9939055569343 78.16318610600007, 40.99411388993432 78.16435832800005, 40.99443055593431 78.16559166000008, 40.99466666793429 78.16655277200006, 40.99497777793433 78.16758610600004, 40.99539166793429 78.16841943900005, 40.9958805559343 78.16911388300008, 40.996341666934285 78.16941110600006, 40.996800000934314 78.16950554900006, 40.99723611193433 78.16943610600003, 40.99769444493431 78.16916666100009, 40.99800000093432 78.16862777300008, 40.99811944493432 78.16778610600005, 40.99811944493432 78.16708332800005, 40.9980638899343 78.16644999400008, 40.99785555593432 78.16548610600006, 40.99762222293433 78.16461943900003, 40.99730833393429 78.16368055000002, 40.99681944493431 78.16282221600005, 40.9960944449343 78.16165832800006, 40.99534722293433 78.16066110500003, 40.99483611193428 78.16006943800005, 40.99452777793434 78.15979999400008, 40.99424444593431 78.15980832700005, 40.99404166793428 78.16000832800006, 40.99388888893431 78.16044166100005, 40.9938444449343 78.16121666100008, 40.99385000093431 78.16208332700006, 40.9939055569343 78.16318610600007)))";
            //str="MULTIPOLYGON (((41.00000011596755 77.99999999388695, 41.00000011190918 78.05759711226416, 40.99943888993435 78.05906388200003), (40.99928888993434 78.05952221500007, 40.99918055593434 78.06055554800008, 40.999261111934324 78.06097221500006, 40.999427778934304 78.06148332600003, 40.99974722293432 78.06189165900008, 41.0000001115983 78.06200923054297, 41.000000108915046 78.10009050427283, 40.999522222934374 78.10106666000019, 40.99899722293444 78.10237777100008, 40.99853333393433 78.10401110400011, 40.99841111193432 78.1046444380001, 40.99839722293437 78.10520832600002, 40.998466667934316 78.10573888200008, 40.9985805559343 78.10598888300008, 40.99888055693439 78.10625832600005, 40.999141667934374 78.10628610400005, 40.99943888993446 78.10619721500007, 40.99969166793442 78.10599721500006, 40.99990555593438 78.10577221500006, 41.00000010852914 78.10556735372379, 41.00000010033296 78.22188909137476, 40.99909166793434 78.22034721700004, 40.99700555693429 78.21731666200003, 40.99575555693433 78.21511388400006, 40.99508333393432 78.21361110600003, 40.994647222934326 78.21221388400005, 40.9943999999343 78.21126666100008, 40.994180555934314 78.20978332800007, 40.992994445934315 78.20964443900004, 40.9916027789343 78.20899444000008, 40.989697222934296 78.20762221700005, 40.98764444493428 78.20539999500005, 40.98540277893424 78.20287221700005, 40.983588888934236 78.20085832800004, 40.982277778934275 78.19917499500008, 40.98168055593426 78.19772499500004, 40.981341666934235 78.19661388300005, 40.981297222934266 78.19559999500007, 40.98147500093423 78.19374999500006, 40.98146666693427 78.19273332900008, 40.98116666793427 78.19215277200004, 40.98086944493424 78.19177221700005, 40.98035277793425 78.19148332800005, 40.97968333393426 78.19139721700002, 40.97912222293423 78.19120555100007, 40.97875000093423 78.19082499500007, 40.978450000934245 78.19009443900006, 40.97825833393421 78.18908055000004, 40.97799444493421 78.18806388400003, 40.9776222229342 78.18734443900007, 40.97706111193424 78.18652777200003, 40.9767222229342 78.18594721700003, 40.97660555593421 78.18517499500007, 40.976841666934206 78.18418332800006, 40.97768333393424 78.18265555000005, 40.97830277793424 78.18153610500009, 40.97883611193426 78.18070277200007, 40.97959166693421 78.17952221700006, 40.98071944493424 78.17808055000006, 40.98202222293425 78.1765888830001, 40.98279444493422 78.17571943900003, 40.98358611193429 78.17423610600008, 40.984313889934285 78.17187499400006, 40.984875000934245 78.17018332800006, 40.98556388993424 78.16843888300006, 40.98620277893427 78.16735277300006, 40.98670555593428 78.16640555000004, 40.98709166693431 78.16560832700003, 40.98731388993428 78.16512221600004, 40.9876333339343 78.16434999400009, 40.98798055593426 78.16372499400006, 40.9878083339343 78.16308054900003, 40.987516667934294 78.16250832700007, 40.986930555934286 78.16226666100006, 40.98649722293429 78.16239721700003, 40.98577222293424 78.16284721700005, 40.98514444593427 78.16361943900006, 40.98406388993428 78.16598055000003, 40.98360555693425 78.16589443900007, 40.98334999993425 78.16590277200004, 40.98305000093424 78.16599721700005, 40.98257500093424 78.16624999400005, 40.98216944593425 78.16668332800003, 40.98198333393426 78.16707499500006, 40.98191388893426 78.16770832700007, 40.981844444934225 78.16834166100006, 40.98155277893423 78.16935832800006, 40.981188889934245 78.17043332700007, 40.98104166693425 78.17101666100007, 40.98097222293425 78.17135555000004, 40.98104722293428 78.17184166100003, 40.98112500093427 78.17203055100003, 40.98136388993427 78.17263888400004, 40.980955556934276 78.17318610600006, 40.980069444934216 78.17386388300008, 40.979180556934246 78.17436666100008, 40.97866666693422 78.17468888300006, 40.97773055593422 78.17570277200008, 40.97692222293421 78.17710832700004, 40.97603333393426 78.17874999500003, 40.97484444493419 78.18005277200005, 40.97410277793419 78.18058055000004, 40.97323333393422 78.18105832800006, 40.972722222934216 78.18139721600006, 40.97173611193418 78.18236110600003, 40.97107222293423 78.18280277300005, 40.9704527779342 78.18308055000006, 40.969786111934205 78.18314166100004, 40.969327777934176 78.18293332800005, 40.96886666793418 78.18233610600004, 40.96802500093419 78.18098888400004, 40.9668500009342 78.17882777300008, 40.96579444493415 78.17633610600006, 40.96216666793418 78.16811666100006, 40.961325000934146 78.16601666100007, 40.96078888893418 78.16411388400007, 40.96040000093413 78.16236110600005, 40.960113888934174 78.16062499500003, 40.959797222934164 78.15919166100008, 40.95948055593418 78.15842777200004, 40.95900555593412 78.15776943900005, 40.958455555934144 78.15721388400004, 40.95778611193416 78.15645832700005, 40.95719166693416 78.15544166000005, 40.956274999934145 78.15348054900005, 40.95544166793412 78.15126666000003, 40.95479722293414 78.14957499400003, 40.95426111193411 78.14811666100007, 40.953675000934155 78.14709999400003, 40.952691666934136 78.14564166100007, 40.95056111193411 78.14196943800003, 40.949283333934076 78.13976666100007, 40.94857777893411 78.13789999400007, 40.9480611119341 78.13578055000005, 40.94766111193409 78.13370554900007, 40.94744444593411 78.13148332700007, 40.94730000093407 78.12923610500007, 40.947330555934094 78.12775277200008, 40.94731666693409 78.12676110500007, 40.947119444934096 78.12571943800003, 40.94639444493411 78.12467777200004, 40.944905555934064 78.12303054900008, 40.9435638899341 78.12180555000002, 40.94298055593409 78.12082499400003, 40.94282222293408 78.12045277200008, 40.94274444493409 78.12000832700005, 40.942708334934096 78.11963610500004, 40.942730555934084 78.11879443800007, 40.942852777934064 78.11804721600004, 40.943022222934104 78.11722221600006, 40.94308055593406 78.11638054900004, 40.9430611119341 78.11580832700008, 40.9429555559341 78.11529443800005, 40.942713889934076 78.11479999400007, 40.942430556934035 78.11436666000003, 40.94182222293404 78.11378610500003, 40.941027778934036 78.11309999300005, 40.94046944593408 78.11227499400007, 40.93995277793408 78.11104999300005, 40.93933611193403 78.10950554900006, 40.93882500093406 78.10855832700008, 40.938102777934034 78.10776110500008, 40.93581666693404 78.10533054800004, 40.93439166693404 78.10370554900004, 40.931072222934034 78.0995222160001, 40.92941111193399 78.09721388200006, 40.927863888933985 78.09478332600008, 40.92679722293399 78.09251666000006, 40.925369444934 78.08854999400008, 40.92482222293398 78.08610277100007, 40.924313889934 78.0833944380001, 40.92386388993398 78.08101666000005, 40.92432222293398 78.08081666000004, 40.92476666693398 78.08060832600006, 40.92512500093398 78.08031388200003, 40.92533888993397 78.07993888100003, 40.925383333933986 78.07966943800005, 40.92533888993397 78.07944443700006, 40.925213889934 78.07925277100003, 40.924730555933984 78.07909721500005, 40.924172222933954 78.07900277100002, 40.923380555933974 78.07908054900008, 40.92296388993399 78.07631943700005, 40.92253888993399 78.07420277100005, 40.922138889933976 78.07198888200007, 40.92203888993399 78.07015554900006, 40.92206666693396 78.06820277100007, 40.92219166793397 78.06662221500004, 40.922702778934 78.06448888100005, 40.923055555933985 78.06298610400006, 40.92381944593397 78.05969721500003, 40.924458333934005 78.05683054800006, 40.92464722293396 78.05533888100007, 40.92467500093396 78.05376665900008, 40.92454444493397 78.05253610400007, 40.92408333393397 78.05074721500006, 40.923463889933984 78.04909721500007, 40.922452778933945 78.04634443700007, 40.92103611193395 78.04232777000004, 40.919644444934 78.03792499200006, 40.91911111193397 78.03601665800005, 40.918850000933965 78.03499999300004, 40.91872499993395 78.03392499300008, 40.918566666933955 78.03288332600005, 40.918169444933945 78.03161388100006, 40.91770833393395 78.03018332600004, 40.91724722293397 78.02874165800006, 40.917030555933934 78.02706665800008, 40.916811111933974 78.02555554700007, 40.916627778933965 78.02463610300002, 40.91637500093396 78.02406388100006, 40.91617222293395 78.02391388000007, 40.91578055593398 78.02388888100006, 40.91550833493392 78.02392499200005, 40.91522222293395 78.02416665900006, 40.91489722293392 78.02466943700006, 40.91450555593394 78.02546943700007, 40.913994444933955 78.02599721400003, 40.913547222933914 78.02631943600005, 40.913000000933934 78.02644165900006, 40.91253611193393 78.02644165900006, 40.912052778933955 78.02643332500007, 40.91165833393392 78.02630276900004, 40.91128611193391 78.02605832500006, 40.911050000933905 78.02573054700008, 40.910919445933914 78.02533054800006, 40.910850000933905 78.02482777000006, 40.910850000933905 78.02420277000004, 40.91089444493392 78.02381110300007, 40.91108611193395 78.02318610300006, 40.911597222933935 78.02236110300004, 40.912022222933935 78.02164999200005, 40.912361111933926 78.02076388100005, 40.91261666793393 78.02008610300004, 40.91289444493394 78.01948888000004, 40.91351666793395 78.01841110300006, 40.914422222933915 78.01709165900007, 40.91497777793393 78.01577221400004, 40.91529444493392 78.01414999200006, 40.91545277793393 78.01223888100003, 40.91552500093395 78.01075554800006, 40.91552222293393 78.00938332500004, 40.915511111933945 78.00736943600003, 40.915508333933936 78.00615554700006, 40.91563055593395 78.00489721400002, 40.91607777893394 78.00309999200005, 40.91636666793392 78.00000000100003, 40.91636666937166 77.99999999395231, 40.94988610835769 77.99999999392612, 40.949886110934116 78.00000000000004, 40.95072499993409 78.00168332500004, 40.95150277793413 78.00528610300005, 40.95183055593412 78.00866388100007, 40.95220555593409 78.01304721400004, 40.95230833393414 78.01606665900006, 40.95263333393411 78.01998332500004, 40.952824999934144 78.02276110300005, 40.95297222293414 78.02614721400005, 40.9527999999341 78.02792499200007, 40.95257777793411 78.02917499200004, 40.9518666679341 78.03184999200005, 40.95105000093412 78.03434165900006, 40.95071666793409 78.03546110300005, 40.9504638889341 78.03684999200004, 40.950555555934095 78.03834999300005, 40.95064722293409 78.04002499200004, 40.951119444934136 78.04285554800002, 40.952152778934135 78.04735277000003, 40.95262500093413 78.04985277000003, 40.95316944593413 78.05271666000006, 40.95365555593413 78.05463610400004, 40.95408333393414 78.05571943700005, 40.95445000093413 78.05642499300006, 40.95477499993411 78.05679721500007, 40.95512499993415 78.05691943700003, 40.95544722293415 78.05687499300006, 40.95573333393414 78.05661388100003, 40.955888889934116 78.05619721500005, 40.956008333934136 78.05523332500007, 40.95602777793415 78.05418332500007, 40.95604722293412 78.05318610400008, 40.95606388993412 78.05201388100005, 40.95608888993412 78.05084166000006, 40.95608611193411 78.05025277000004, 40.956127777934135 78.04987777100007, 40.956186110934105 78.04952221500008, 40.95630555693413 78.04923610300004, 40.95645000093415 78.04923610300004, 40.95654166793414 78.04934999300008, 40.95666666693412 78.04977499200002, 40.95679722293411 78.05076388100008, 40.95700555593415 78.05149443700003, 40.957208333934105 78.05198054800007, 40.95753888993411 78.05233610300009, 40.95790277893415 78.05244721400004, 40.95831944493412 78.05246666000005, 40.95857222293413 78.05238610400004, 40.95891111193417 78.05207499200003, 40.95916111193416 78.05164999300007, 40.959349999934126 78.0506333260001, 40.95954444493416 78.04791666000006, 40.959558333934154 78.04626665900008, 40.959419444934134 78.04394166000003, 40.95921111193416 78.04247499300004, 40.95895833393414 78.04055554800004, 40.95885833393417 78.03814165900008, 40.95890277893413 78.03676110300006, 40.95907222293416 78.03486943700005, 40.95922222293413 78.03256943600007, 40.95940000093415 78.02925276900002, 40.95961944493414 78.02659721400005, 40.960000000934116 78.02438332600008, 40.960441666934166 78.02268332500006, 40.96066111193413 78.02127499300008, 40.960994445934126 78.01968888100002, 40.96124166793417 78.01857777000002, 40.96148888993417 78.01747499200007, 40.96179166693417 78.01651110300008, 40.96219166793417 78.01553888100005, 40.961424999934195 78.01314165800004, 40.96034166793418 78.00970554700007, 40.95971666793415 78.00723888000005, 40.95948333393412 78.00545277000003, 40.95892500093416 78.00000000000004, 40.9589249992887 77.99999999391905, 41.00000011596755 77.99999999388695)), ((40.92412777893399 78.02394165900006, 40.92427499993396 78.02488610400009, 40.924622222933976 78.02597221400003, 40.92499444493397 78.02653610300005, 40.925516666934016 78.02705832500003, 40.92611944493398 78.02742221400008, 40.92672222293402 78.02756943600008, 40.927694444934 78.02751665900007, 40.92841111093401 78.02731665900005, 40.92976111193401 78.02662221400004, 40.93087777893403 78.02596388100005, 40.93161944493399 78.02542499200007, 40.93205000093401 78.02492221400007, 40.93239166693403 78.02431388100007, 40.932561111934 78.02359443600007, 40.93250000093402 78.02296110300004, 40.932269444934015 78.02228332500005, 40.93198333393403 78.02186665900005, 40.931580555934005 78.02150276900005, 40.93094722293401 78.02101665800006, 40.92988333393403 78.02058054700005, 40.928619444934 78.02040832600005, 40.927244444934 78.02050277000006, 40.92675277893396 78.02062499300007, 40.926094445933984 78.02071110300005, 40.92537777893397 78.02094721400005, 40.924777778934 78.02144165900006, 40.92443611193396 78.02178888100008, 40.924205555933995 78.02228332500005, 40.92409166793401 78.02296110300004, 40.92412777893399 78.02394165900006)), ((40.96888055593424 78.09316943700003, 40.96970833393433 78.09481666000016, 40.97029444493424 78.09580832700004, 40.9706555559342 78.09682221500009, 40.97087222293427 78.09756943700012, 40.97116666793417 78.0993499940001, 40.9714888899342 78.10078888200013, 40.97185000093433 78.10219721500005, 40.97251666793417 78.10388054900004, 40.97313333393423 78.10531388300019, 40.974369444934254 78.10837777200008, 40.97534722293419 78.11083332700015, 40.97598888993422 78.11269166100004, 40.97626666693424 78.11376666000012, 40.977213889934156 78.11625832700014, 40.97824722293433 78.11909721600011, 40.97919722293421 78.12209166100013, 40.98003055693427 78.12458332700004, 40.980933334934164 78.12829999400003, 40.98165000093436 78.13110277100004, 40.98262500093434 78.13443610600001, 40.98341111193432 78.13651110500001, 40.98451388993423 78.13894166100005, 40.98572500093438 78.14168332800017, 40.986930555934386 78.14529443800014, 40.98809444593439 78.14894999400008, 40.98891388893429 78.15091943800013, 40.989777778934354 78.15292499500009, 40.99061944593427 78.15432221700007, 40.99118611193427 78.15505277200003, 40.99157499993425 78.15523332700013, 40.991844444934266 78.15523332700013, 40.99208888993435 78.15506943900004, 40.99223611193424 78.154688883, 40.99247500093441 78.15391388300003, 40.992591666934295 78.1529527730001, 40.99278333393427 78.15202221600009, 40.99290000093443 78.15158055000012, 40.99324166693443 78.15122499400002, 40.99346388993423 78.15124999400011, 40.99368055593444 78.15140554900012, 40.994175000934405 78.15209999400012, 40.99497777893438 78.15399443900014, 40.99560000093433 78.15578055000003, 40.995847222934366 78.1563361050001, 40.99609444493441 78.15681388300015, 40.9963722229343 78.15701388299999, 40.99667500093429 78.15704999400009, 40.99698333393432 78.15700555000012, 40.99728611193431 78.1566833280001, 40.99758611193446 78.15591943900006, 40.997702778934446 78.15463610500012, 40.99766944493437 78.15383610600007, 40.997477778934275 78.15288332700004, 40.99695277893435 78.15140555000005, 40.996302777934346 78.14989721600011, 40.99537222293432 78.14795277200017, 40.99415833393432 78.14573054900006, 40.993497222934444 78.14428888300017, 40.992869444934364 78.14229999399998, 40.992452777934275 78.14030277200014, 40.99208888893441 78.137569439, 40.99149444593434 78.13546110499999, 40.990847222934356 78.13334999400007, 40.9903861119343 78.13209166100012, 40.98975277893442 78.13090277200007, 40.988849999934416 78.12979166000014, 40.987405555934224 78.1280916610001, 40.98648888893432 78.1274833280001, 40.98600277893426 78.12718888299997, 40.98556944493427 78.12686666100018, 40.98536388993424 78.12660554900003, 40.985202778934344 78.12594721600003, 40.98506944493429 78.12532221500008, 40.98470555593432 78.12421110499997, 40.984052777934295 78.1226999930002, 40.983458333934294 78.12164999400011, 40.98292222293427 78.1210249940001, 40.98235555593438 78.12040832700012, 40.98197500093423 78.11973054900017, 40.98124999993435 78.11788332800018, 40.980538888934255 78.11573888200002, 40.97949722293436 78.11325554900003, 40.97864722293417 78.11168332700015, 40.97764444493436 78.10951388300003, 40.9766666669343 78.1070499930001, 40.97598888993422 78.10527777100003, 40.97536944593434 78.10291666000012, 40.97483888993428 78.10122499300007, 40.974341667934176 78.09937499300014, 40.97383333393422 78.09664999400013, 40.97361666793425 78.09465277200015, 40.973419444934144 78.0913194380002, 40.97315555593426 78.08954999300005, 40.97286111193425 78.08804721500006, 40.97246666693421 78.08709999300002, 40.97132500093422 78.08506943800013, 40.97040277893429 78.0837166600001, 40.969866666934166 78.08268332600005, 40.96947500093429 78.08182221500016, 40.96896666793426 78.08061666000016, 40.968636111934266 78.07946110400007, 40.9684583339343 78.07769166000008, 40.9684638899342 78.07567777100013, 40.96857222293422 78.07393332600014, 40.968666667934265 78.07283888100012, 40.96860277793412 78.07198054800006, 40.9684638899342 78.07116388200012, 40.968188889934154 78.07038332600001, 40.96792500093427 78.06997499300007, 40.96766111193421 78.0699138820001, 40.96742500093428 78.0699138820001, 40.967216667934174 78.07012221500021, 40.96706944593428 78.07056388200004, 40.96682222293414 78.07146665900007, 40.96677222293426 78.07203054899998, 40.96660555593429 78.07295277000003, 40.96636388993415 78.07423610300003, 40.96620277793415 78.07545277100019, 40.96612777893427 78.0777611040001, 40.96618611193419 78.07901943800016, 40.96635555593418 78.08021666000008, 40.96661388893416 78.08120554800017, 40.96725277793416 78.0832888830002, 40.96769166793424 78.08504443800001, 40.96785555593432 78.08658054800014, 40.96786944493432 78.0876138820002, 40.96779444493412 78.08901943700005, 40.96780277893431 78.08986110400012, 40.96784166693431 78.09066943800002, 40.967930556934235 78.09119721500008, 40.96826388993419 78.09200554900019, 40.96888055593424 78.09316943700003)), ((40.97668888893435 78.09399443800015, 40.97688333393415 78.09517499400016, 40.97713888993416 78.09611943800013, 40.97769444493423 78.09717777100002, 40.97821944493433 78.0979611050002, 40.978863888934214 78.09877499400011, 40.97963055693419 78.09979166000005, 40.98000000093424 78.10014721600015, 40.980302778934245 78.10029443800005, 40.98054722293423 78.10029443700016, 40.98078611193433 78.10005277100004, 40.98089722293418 78.0995388820001, 40.9809500009343 78.09847221600012, 40.98092777893426 78.09681388200005, 40.98071666793427 78.09425277100013, 40.980394444934355 78.09229166000017, 40.97997500093432 78.09016388200013, 40.97950555693434 78.08867221500007, 40.97903611193431 78.08753610400015, 40.97801111193423 78.08533888200003, 40.97764444493436 78.0846694380001, 40.977336111934335 78.08448054899998, 40.977036111934176 78.08448888200007, 40.97679722293423 78.08476666000013, 40.97665277893418 78.0857111040001, 40.976619444934265 78.08772499400015, 40.97655000093419 78.08985277100004, 40.97656666793426 78.09123332700004, 40.97658055593434 78.09237777100009, 40.97668888893435 78.09399443800015)), ((40.98303888993426 78.10904443800007, 40.98319444493425 78.11066943700007, 40.98342499993428 78.11216110500004, 40.98393611193424 78.11418332700003, 40.98457500093426 78.11586943800006, 40.98527222293425 78.11754443800004, 40.98577222293424 78.11845555000008, 40.98598888993427 78.11877499300003, 40.98631944493427 78.11908888300007, 40.98665000093426 78.11920277100006, 40.986888889934264 78.11914999400005, 40.9872138899343 78.11900277100005, 40.98761388993426 78.11856666100006, 40.987752778934286 78.11813332700007, 40.987822222934255 78.11766388200004, 40.98781666693429 78.11725832700007, 40.98777222293427 78.11654443800006, 40.98761388993426 78.11561666100006, 40.987347222934254 78.11464443800008, 40.98693611193424 78.11360277100005, 40.98643611193426 78.11258610400007, 40.985355555934284 78.11038332600003, 40.98474444493426 78.10925277100006, 40.98418333393428 78.10824721500006, 40.98381111193427 78.1078305490001, 40.98344166793428 78.10765554900006, 40.983216666934275 78.10764721600003, 40.98310277893424 78.10775277100004, 40.98302500093425 78.10789999300005, 40.98300833493424 78.10817777200003, 40.98303888993426 78.10904443800007)), ((40.9939055569343 78.16318610600007, 40.99411388993432 78.16435832800005, 40.99443055593431 78.16559166000008, 40.99466666793429 78.16655277200006, 40.99497777793433 78.16758610600004, 40.99539166793429 78.16841943900005, 40.9958805559343 78.16911388300008, 40.996341666934285 78.16941110600006, 40.996800000934314 78.16950554900006, 40.99723611193433 78.16943610600003, 40.99769444493431 78.16916666100009, 40.99800000093432 78.16862777300008, 40.99811944493432 78.16778610600005, 40.99811944493432 78.16708332800005, 40.9980638899343 78.16644999400008, 40.99785555593432 78.16548610600006, 40.99762222293433 78.16461943900003, 40.99730833393429 78.16368055000002, 40.99681944493431 78.16282221600005, 40.9960944449343 78.16165832800006, 40.99534722293433 78.16066110500003, 40.99483611193428 78.16006943800005, 40.99452777793434 78.15979999400008, 40.99424444593431 78.15980832700005, 40.99404166793428 78.16000832800006, 40.99388888893431 78.16044166100005, 40.9938444449343 78.16121666100008, 40.99385000093431 78.16208332700006, 40.9939055569343 78.16318610600007)))";
            String[] splits1=str.split("\\(\\(\\(|\\)\\)\\)");
            String strDest="";
            if(splits1.length>=2){
                String[] splits2=splits1[splits1.length-1].split("\\)\\), \\(\\(");
                if(splits2.length>=2){
                    for(int m=0;m<splits2.length;m++){
                        String[] splits3=splits2[m].split("\\), \\(");
                        if(splits3.length>=2){
                            for(int j=0;j<splits3.length;j++) {
                                String[] splits4 = splits3[j].split(",");
                                if(splits4.length>0) {
                                    for (int i = 0; i < splits4.length; i++) {
                                        String[] splits5 = splits4[i].trim().split(" ");
                                        if (splits5.length == 2) {
                                            strDest += splits5[1] + " " + splits5[0] + ", ";
                                        }
                                    }
                                    strDest=strDest.substring(0,strDest.length()-2);
                                }
                                strDest+="), (";
                            }
                            strDest=strDest.substring(0,strDest.length()-4);//"), ("的长度
                            //strDest+=")), ((";
                        }else{
                            String[] splits4=splits3[0].split(",");
                            if(splits4.length>0) {
                                for (int i = 0; i < splits4.length; i++) {
                                    String[] splits5 = splits4[i].trim().split(" ");
                                    if (splits5.length == 2) {
                                        strDest += splits5[1] + " " + splits5[0] + ", ";
                                    }
                                }
                                strDest=strDest.substring(0,strDest.length()-2);
                            }
                        }
                        strDest+=")), ((";
                    }
                    strDest=strDest.substring(0,strDest.length()-6);//")), (("的长度
                }else{
                    String[] splits3=splits1[splits1.length-1].split("\\), \\(");
                    if(splits3.length>=2){
                        for(int j=0;j<splits3.length;j++) {
                            String[] splits4 = splits3[j].split(",");
                            if(splits4.length>0) {
                                for (int i = 0; i < splits4.length; i++) {
                                    String[] splits5 = splits4[i].trim().split(" ");
                                    if (splits5.length == 2) {
                                        strDest += splits5[1] + " " + splits5[0] + ", ";
                                    }
                                }
                                strDest=strDest.substring(0,strDest.length()-2);
                            }
                            strDest+="), (";
                        }
                        strDest=strDest.substring(0,strDest.length()-4);//"), ("的长度
                    }else{
                        //String[] splits4=splits1[splits1.length-1].split(",");//通过最初的数据进行经纬度分割
                        String[] splits4=splits2[0].split(",");
                        if(splits4.length>0) {
                            for (int i = 0; i < splits4.length; i++) {
                                String[] splits5 = splits4[i].trim().split(" ");
                                if (splits5.length == 2) {
                                    strDest += splits5[1] + " " + splits5[0] + ", ";
                                }
                            }
                            strDest=strDest.substring(0,strDest.length()-2);
                        }
                    }
                }
                strDest=splits1[0]+"((("+strDest+")))";
            }
            //Geometry g2 = geometryFactory.createGeometry(strDest);
            return JTS.transform(geom, transform);
        }
        catch (Exception e) {
            e.printStackTrace();
            return null;
        }
    }

    public static String webMactor2LonlatEx (Geometry geom){
        try{
            CoordinateReferenceSystem sourceTarget = CRS.parseWKT(strWKTMercator);
            /*CoordinateReferenceSystem crsTarget = CRS.decode("EPSG:4326");
            MathTransform transform = CRS.findMathTransform(sourceTarget, crsTarget, true);*/
            //MathTransform transform = CRS.findMathTransform(sourceTarget, DefaultGeographicCRS.WGS84, true);
            CoordinateReferenceSystem crsTarget = CRS.decode("EPSG:4490");
            MathTransform transform = CRS.findMathTransform(sourceTarget, crsTarget,true);
            Geometry resSource=JTS.transform(geom, transform);
            String str=resSource.toString();
            //str="MULTIPOLYGON (((41.00000011596755 77.99999999388695, 41.00000011190918 78.05759711226416, 40.99943888993435 78.05906388200003, 40.99928888993434 78.05952221500007, 40.99918055593434 78.06055554800008, 40.999261111934324 78.06097221500006, 40.999427778934304 78.06148332600003, 40.99974722293432 78.06189165900008, 41.0000001115983 78.06200923054297, 41.000000108915046 78.10009050427283, 40.999522222934374 78.10106666000019, 40.99899722293444 78.10237777100008, 40.99853333393433 78.10401110400011, 40.99841111193432 78.1046444380001, 40.99839722293437 78.10520832600002, 40.998466667934316 78.10573888200008, 40.9985805559343 78.10598888300008, 40.99888055693439 78.10625832600005, 40.999141667934374 78.10628610400005, 40.99943888993446 78.10619721500007, 40.99969166793442 78.10599721500006, 40.99990555593438 78.10577221500006, 41.00000010852914 78.10556735372379, 41.00000010033296 78.22188909137476, 40.99909166793434 78.22034721700004, 40.99700555693429 78.21731666200003, 40.99575555693433 78.21511388400006, 40.99508333393432 78.21361110600003, 40.994647222934326 78.21221388400005, 40.9943999999343 78.21126666100008, 40.994180555934314 78.20978332800007, 40.992994445934315 78.20964443900004, 40.9916027789343 78.20899444000008, 40.989697222934296 78.20762221700005, 40.98764444493428 78.20539999500005, 40.98540277893424 78.20287221700005, 40.983588888934236 78.20085832800004, 40.982277778934275 78.19917499500008, 40.98168055593426 78.19772499500004, 40.981341666934235 78.19661388300005, 40.981297222934266 78.19559999500007, 40.98147500093423 78.19374999500006, 40.98146666693427 78.19273332900008, 40.98116666793427 78.19215277200004, 40.98086944493424 78.19177221700005, 40.98035277793425 78.19148332800005, 40.97968333393426 78.19139721700002, 40.97912222293423 78.19120555100007, 40.97875000093423 78.19082499500007, 40.978450000934245 78.19009443900006, 40.97825833393421 78.18908055000004, 40.97799444493421 78.18806388400003, 40.9776222229342 78.18734443900007, 40.97706111193424 78.18652777200003, 40.9767222229342 78.18594721700003, 40.97660555593421 78.18517499500007, 40.976841666934206 78.18418332800006, 40.97768333393424 78.18265555000005, 40.97830277793424 78.18153610500009, 40.97883611193426 78.18070277200007, 40.97959166693421 78.17952221700006, 40.98071944493424 78.17808055000006, 40.98202222293425 78.1765888830001, 40.98279444493422 78.17571943900003, 40.98358611193429 78.17423610600008, 40.984313889934285 78.17187499400006, 40.984875000934245 78.17018332800006, 40.98556388993424 78.16843888300006, 40.98620277893427 78.16735277300006, 40.98670555593428 78.16640555000004, 40.98709166693431 78.16560832700003, 40.98731388993428 78.16512221600004, 40.9876333339343 78.16434999400009, 40.98798055593426 78.16372499400006, 40.9878083339343 78.16308054900003, 40.987516667934294 78.16250832700007, 40.986930555934286 78.16226666100006, 40.98649722293429 78.16239721700003, 40.98577222293424 78.16284721700005, 40.98514444593427 78.16361943900006, 40.98406388993428 78.16598055000003, 40.98360555693425 78.16589443900007, 40.98334999993425 78.16590277200004, 40.98305000093424 78.16599721700005, 40.98257500093424 78.16624999400005, 40.98216944593425 78.16668332800003, 40.98198333393426 78.16707499500006, 40.98191388893426 78.16770832700007, 40.981844444934225 78.16834166100006, 40.98155277893423 78.16935832800006, 40.981188889934245 78.17043332700007, 40.98104166693425 78.17101666100007, 40.98097222293425 78.17135555000004, 40.98104722293428 78.17184166100003, 40.98112500093427 78.17203055100003, 40.98136388993427 78.17263888400004, 40.980955556934276 78.17318610600006, 40.980069444934216 78.17386388300008, 40.979180556934246 78.17436666100008, 40.97866666693422 78.17468888300006, 40.97773055593422 78.17570277200008, 40.97692222293421 78.17710832700004, 40.97603333393426 78.17874999500003, 40.97484444493419 78.18005277200005, 40.97410277793419 78.18058055000004, 40.97323333393422 78.18105832800006, 40.972722222934216 78.18139721600006, 40.97173611193418 78.18236110600003, 40.97107222293423 78.18280277300005, 40.9704527779342 78.18308055000006, 40.969786111934205 78.18314166100004, 40.969327777934176 78.18293332800005, 40.96886666793418 78.18233610600004, 40.96802500093419 78.18098888400004, 40.9668500009342 78.17882777300008, 40.96579444493415 78.17633610600006, 40.96216666793418 78.16811666100006, 40.961325000934146 78.16601666100007, 40.96078888893418 78.16411388400007, 40.96040000093413 78.16236110600005, 40.960113888934174 78.16062499500003, 40.959797222934164 78.15919166100008, 40.95948055593418 78.15842777200004, 40.95900555593412 78.15776943900005, 40.958455555934144 78.15721388400004, 40.95778611193416 78.15645832700005, 40.95719166693416 78.15544166000005, 40.956274999934145 78.15348054900005, 40.95544166793412 78.15126666000003, 40.95479722293414 78.14957499400003, 40.95426111193411 78.14811666100007, 40.953675000934155 78.14709999400003, 40.952691666934136 78.14564166100007, 40.95056111193411 78.14196943800003, 40.949283333934076 78.13976666100007, 40.94857777893411 78.13789999400007, 40.9480611119341 78.13578055000005, 40.94766111193409 78.13370554900007, 40.94744444593411 78.13148332700007, 40.94730000093407 78.12923610500007, 40.947330555934094 78.12775277200008, 40.94731666693409 78.12676110500007, 40.947119444934096 78.12571943800003, 40.94639444493411 78.12467777200004, 40.944905555934064 78.12303054900008, 40.9435638899341 78.12180555000002, 40.94298055593409 78.12082499400003, 40.94282222293408 78.12045277200008, 40.94274444493409 78.12000832700005, 40.942708334934096 78.11963610500004, 40.942730555934084 78.11879443800007, 40.942852777934064 78.11804721600004, 40.943022222934104 78.11722221600006, 40.94308055593406 78.11638054900004, 40.9430611119341 78.11580832700008, 40.9429555559341 78.11529443800005, 40.942713889934076 78.11479999400007, 40.942430556934035 78.11436666000003, 40.94182222293404 78.11378610500003, 40.941027778934036 78.11309999300005, 40.94046944593408 78.11227499400007, 40.93995277793408 78.11104999300005, 40.93933611193403 78.10950554900006, 40.93882500093406 78.10855832700008, 40.938102777934034 78.10776110500008, 40.93581666693404 78.10533054800004, 40.93439166693404 78.10370554900004, 40.931072222934034 78.0995222160001, 40.92941111193399 78.09721388200006, 40.927863888933985 78.09478332600008, 40.92679722293399 78.09251666000006, 40.925369444934 78.08854999400008, 40.92482222293398 78.08610277100007, 40.924313889934 78.0833944380001, 40.92386388993398 78.08101666000005, 40.92432222293398 78.08081666000004, 40.92476666693398 78.08060832600006, 40.92512500093398 78.08031388200003, 40.92533888993397 78.07993888100003, 40.925383333933986 78.07966943800005, 40.92533888993397 78.07944443700006, 40.925213889934 78.07925277100003, 40.924730555933984 78.07909721500005, 40.924172222933954 78.07900277100002, 40.923380555933974 78.07908054900008, 40.92296388993399 78.07631943700005, 40.92253888993399 78.07420277100005, 40.922138889933976 78.07198888200007, 40.92203888993399 78.07015554900006, 40.92206666693396 78.06820277100007, 40.92219166793397 78.06662221500004, 40.922702778934 78.06448888100005, 40.923055555933985 78.06298610400006, 40.92381944593397 78.05969721500003, 40.924458333934005 78.05683054800006, 40.92464722293396 78.05533888100007, 40.92467500093396 78.05376665900008, 40.92454444493397 78.05253610400007, 40.92408333393397 78.05074721500006, 40.923463889933984 78.04909721500007, 40.922452778933945 78.04634443700007, 40.92103611193395 78.04232777000004, 40.919644444934 78.03792499200006, 40.91911111193397 78.03601665800005, 40.918850000933965 78.03499999300004, 40.91872499993395 78.03392499300008, 40.918566666933955 78.03288332600005, 40.918169444933945 78.03161388100006, 40.91770833393395 78.03018332600004, 40.91724722293397 78.02874165800006, 40.917030555933934 78.02706665800008, 40.916811111933974 78.02555554700007, 40.916627778933965 78.02463610300002, 40.91637500093396 78.02406388100006, 40.91617222293395 78.02391388000007, 40.91578055593398 78.02388888100006, 40.91550833493392 78.02392499200005, 40.91522222293395 78.02416665900006, 40.91489722293392 78.02466943700006, 40.91450555593394 78.02546943700007, 40.913994444933955 78.02599721400003, 40.913547222933914 78.02631943600005, 40.913000000933934 78.02644165900006, 40.91253611193393 78.02644165900006, 40.912052778933955 78.02643332500007, 40.91165833393392 78.02630276900004, 40.91128611193391 78.02605832500006, 40.911050000933905 78.02573054700008, 40.910919445933914 78.02533054800006, 40.910850000933905 78.02482777000006, 40.910850000933905 78.02420277000004, 40.91089444493392 78.02381110300007, 40.91108611193395 78.02318610300006, 40.911597222933935 78.02236110300004, 40.912022222933935 78.02164999200005, 40.912361111933926 78.02076388100005, 40.91261666793393 78.02008610300004, 40.91289444493394 78.01948888000004, 40.91351666793395 78.01841110300006, 40.914422222933915 78.01709165900007, 40.91497777793393 78.01577221400004, 40.91529444493392 78.01414999200006, 40.91545277793393 78.01223888100003, 40.91552500093395 78.01075554800006, 40.91552222293393 78.00938332500004, 40.915511111933945 78.00736943600003, 40.915508333933936 78.00615554700006, 40.91563055593395 78.00489721400002, 40.91607777893394 78.00309999200005, 40.91636666793392 78.00000000100003, 40.91636666937166 77.99999999395231, 40.94988610835769 77.99999999392612, 40.949886110934116 78.00000000000004, 40.95072499993409 78.00168332500004, 40.95150277793413 78.00528610300005, 40.95183055593412 78.00866388100007, 40.95220555593409 78.01304721400004, 40.95230833393414 78.01606665900006, 40.95263333393411 78.01998332500004, 40.952824999934144 78.02276110300005, 40.95297222293414 78.02614721400005, 40.9527999999341 78.02792499200007, 40.95257777793411 78.02917499200004, 40.9518666679341 78.03184999200005, 40.95105000093412 78.03434165900006, 40.95071666793409 78.03546110300005, 40.9504638889341 78.03684999200004, 40.950555555934095 78.03834999300005, 40.95064722293409 78.04002499200004, 40.951119444934136 78.04285554800002, 40.952152778934135 78.04735277000003, 40.95262500093413 78.04985277000003, 40.95316944593413 78.05271666000006, 40.95365555593413 78.05463610400004, 40.95408333393414 78.05571943700005, 40.95445000093413 78.05642499300006, 40.95477499993411 78.05679721500007, 40.95512499993415 78.05691943700003, 40.95544722293415 78.05687499300006, 40.95573333393414 78.05661388100003, 40.955888889934116 78.05619721500005, 40.956008333934136 78.05523332500007, 40.95602777793415 78.05418332500007, 40.95604722293412 78.05318610400008, 40.95606388993412 78.05201388100005, 40.95608888993412 78.05084166000006, 40.95608611193411 78.05025277000004, 40.956127777934135 78.04987777100007, 40.956186110934105 78.04952221500008, 40.95630555693413 78.04923610300004, 40.95645000093415 78.04923610300004, 40.95654166793414 78.04934999300008, 40.95666666693412 78.04977499200002, 40.95679722293411 78.05076388100008, 40.95700555593415 78.05149443700003, 40.957208333934105 78.05198054800007, 40.95753888993411 78.05233610300009, 40.95790277893415 78.05244721400004, 40.95831944493412 78.05246666000005, 40.95857222293413 78.05238610400004, 40.95891111193417 78.05207499200003, 40.95916111193416 78.05164999300007, 40.959349999934126 78.0506333260001, 40.95954444493416 78.04791666000006, 40.959558333934154 78.04626665900008, 40.959419444934134 78.04394166000003, 40.95921111193416 78.04247499300004, 40.95895833393414 78.04055554800004, 40.95885833393417 78.03814165900008, 40.95890277893413 78.03676110300006, 40.95907222293416 78.03486943700005, 40.95922222293413 78.03256943600007, 40.95940000093415 78.02925276900002, 40.95961944493414 78.02659721400005, 40.960000000934116 78.02438332600008, 40.960441666934166 78.02268332500006, 40.96066111193413 78.02127499300008, 40.960994445934126 78.01968888100002, 40.96124166793417 78.01857777000002, 40.96148888993417 78.01747499200007, 40.96179166693417 78.01651110300008, 40.96219166793417 78.01553888100005, 40.961424999934195 78.01314165800004, 40.96034166793418 78.00970554700007, 40.95971666793415 78.00723888000005, 40.95948333393412 78.00545277000003, 40.95892500093416 78.00000000000004, 40.9589249992887 77.99999999391905, 41.00000011596755 77.99999999388695)), ((40.92412777893399 78.02394165900006, 40.92427499993396 78.02488610400009, 40.924622222933976 78.02597221400003, 40.92499444493397 78.02653610300005, 40.925516666934016 78.02705832500003, 40.92611944493398 78.02742221400008, 40.92672222293402 78.02756943600008, 40.927694444934 78.02751665900007, 40.92841111093401 78.02731665900005, 40.92976111193401 78.02662221400004, 40.93087777893403 78.02596388100005, 40.93161944493399 78.02542499200007, 40.93205000093401 78.02492221400007, 40.93239166693403 78.02431388100007, 40.932561111934 78.02359443600007, 40.93250000093402 78.02296110300004, 40.932269444934015 78.02228332500005, 40.93198333393403 78.02186665900005, 40.931580555934005 78.02150276900005, 40.93094722293401 78.02101665800006, 40.92988333393403 78.02058054700005, 40.928619444934 78.02040832600005, 40.927244444934 78.02050277000006, 40.92675277893396 78.02062499300007, 40.926094445933984 78.02071110300005, 40.92537777893397 78.02094721400005, 40.924777778934 78.02144165900006, 40.92443611193396 78.02178888100008, 40.924205555933995 78.02228332500005, 40.92409166793401 78.02296110300004, 40.92412777893399 78.02394165900006)), ((40.96888055593424 78.09316943700003, 40.96970833393433 78.09481666000016, 40.97029444493424 78.09580832700004, 40.9706555559342 78.09682221500009, 40.97087222293427 78.09756943700012, 40.97116666793417 78.0993499940001, 40.9714888899342 78.10078888200013, 40.97185000093433 78.10219721500005, 40.97251666793417 78.10388054900004, 40.97313333393423 78.10531388300019, 40.974369444934254 78.10837777200008, 40.97534722293419 78.11083332700015, 40.97598888993422 78.11269166100004, 40.97626666693424 78.11376666000012, 40.977213889934156 78.11625832700014, 40.97824722293433 78.11909721600011, 40.97919722293421 78.12209166100013, 40.98003055693427 78.12458332700004, 40.980933334934164 78.12829999400003, 40.98165000093436 78.13110277100004, 40.98262500093434 78.13443610600001, 40.98341111193432 78.13651110500001, 40.98451388993423 78.13894166100005, 40.98572500093438 78.14168332800017, 40.986930555934386 78.14529443800014, 40.98809444593439 78.14894999400008, 40.98891388893429 78.15091943800013, 40.989777778934354 78.15292499500009, 40.99061944593427 78.15432221700007, 40.99118611193427 78.15505277200003, 40.99157499993425 78.15523332700013, 40.991844444934266 78.15523332700013, 40.99208888993435 78.15506943900004, 40.99223611193424 78.154688883, 40.99247500093441 78.15391388300003, 40.992591666934295 78.1529527730001, 40.99278333393427 78.15202221600009, 40.99290000093443 78.15158055000012, 40.99324166693443 78.15122499400002, 40.99346388993423 78.15124999400011, 40.99368055593444 78.15140554900012, 40.994175000934405 78.15209999400012, 40.99497777893438 78.15399443900014, 40.99560000093433 78.15578055000003, 40.995847222934366 78.1563361050001, 40.99609444493441 78.15681388300015, 40.9963722229343 78.15701388299999, 40.99667500093429 78.15704999400009, 40.99698333393432 78.15700555000012, 40.99728611193431 78.1566833280001, 40.99758611193446 78.15591943900006, 40.997702778934446 78.15463610500012, 40.99766944493437 78.15383610600007, 40.997477778934275 78.15288332700004, 40.99695277893435 78.15140555000005, 40.996302777934346 78.14989721600011, 40.99537222293432 78.14795277200017, 40.99415833393432 78.14573054900006, 40.993497222934444 78.14428888300017, 40.992869444934364 78.14229999399998, 40.992452777934275 78.14030277200014, 40.99208888893441 78.137569439, 40.99149444593434 78.13546110499999, 40.990847222934356 78.13334999400007, 40.9903861119343 78.13209166100012, 40.98975277893442 78.13090277200007, 40.988849999934416 78.12979166000014, 40.987405555934224 78.1280916610001, 40.98648888893432 78.1274833280001, 40.98600277893426 78.12718888299997, 40.98556944493427 78.12686666100018, 40.98536388993424 78.12660554900003, 40.985202778934344 78.12594721600003, 40.98506944493429 78.12532221500008, 40.98470555593432 78.12421110499997, 40.984052777934295 78.1226999930002, 40.983458333934294 78.12164999400011, 40.98292222293427 78.1210249940001, 40.98235555593438 78.12040832700012, 40.98197500093423 78.11973054900017, 40.98124999993435 78.11788332800018, 40.980538888934255 78.11573888200002, 40.97949722293436 78.11325554900003, 40.97864722293417 78.11168332700015, 40.97764444493436 78.10951388300003, 40.9766666669343 78.1070499930001, 40.97598888993422 78.10527777100003, 40.97536944593434 78.10291666000012, 40.97483888993428 78.10122499300007, 40.974341667934176 78.09937499300014, 40.97383333393422 78.09664999400013, 40.97361666793425 78.09465277200015, 40.973419444934144 78.0913194380002, 40.97315555593426 78.08954999300005, 40.97286111193425 78.08804721500006, 40.97246666693421 78.08709999300002, 40.97132500093422 78.08506943800013, 40.97040277893429 78.0837166600001, 40.969866666934166 78.08268332600005, 40.96947500093429 78.08182221500016, 40.96896666793426 78.08061666000016, 40.968636111934266 78.07946110400007, 40.9684583339343 78.07769166000008, 40.9684638899342 78.07567777100013, 40.96857222293422 78.07393332600014, 40.968666667934265 78.07283888100012, 40.96860277793412 78.07198054800006, 40.9684638899342 78.07116388200012, 40.968188889934154 78.07038332600001, 40.96792500093427 78.06997499300007, 40.96766111193421 78.0699138820001, 40.96742500093428 78.0699138820001, 40.967216667934174 78.07012221500021, 40.96706944593428 78.07056388200004, 40.96682222293414 78.07146665900007, 40.96677222293426 78.07203054899998, 40.96660555593429 78.07295277000003, 40.96636388993415 78.07423610300003, 40.96620277793415 78.07545277100019, 40.96612777893427 78.0777611040001, 40.96618611193419 78.07901943800016, 40.96635555593418 78.08021666000008, 40.96661388893416 78.08120554800017, 40.96725277793416 78.0832888830002, 40.96769166793424 78.08504443800001, 40.96785555593432 78.08658054800014, 40.96786944493432 78.0876138820002, 40.96779444493412 78.08901943700005, 40.96780277893431 78.08986110400012, 40.96784166693431 78.09066943800002, 40.967930556934235 78.09119721500008, 40.96826388993419 78.09200554900019, 40.96888055593424 78.09316943700003)), ((40.97668888893435 78.09399443800015, 40.97688333393415 78.09517499400016, 40.97713888993416 78.09611943800013, 40.97769444493423 78.09717777100002, 40.97821944493433 78.0979611050002, 40.978863888934214 78.09877499400011, 40.97963055693419 78.09979166000005, 40.98000000093424 78.10014721600015, 40.980302778934245 78.10029443800005, 40.98054722293423 78.10029443700016, 40.98078611193433 78.10005277100004, 40.98089722293418 78.0995388820001, 40.9809500009343 78.09847221600012, 40.98092777893426 78.09681388200005, 40.98071666793427 78.09425277100013, 40.980394444934355 78.09229166000017, 40.97997500093432 78.09016388200013, 40.97950555693434 78.08867221500007, 40.97903611193431 78.08753610400015, 40.97801111193423 78.08533888200003, 40.97764444493436 78.0846694380001, 40.977336111934335 78.08448054899998, 40.977036111934176 78.08448888200007, 40.97679722293423 78.08476666000013, 40.97665277893418 78.0857111040001, 40.976619444934265 78.08772499400015, 40.97655000093419 78.08985277100004, 40.97656666793426 78.09123332700004, 40.97658055593434 78.09237777100009, 40.97668888893435 78.09399443800015)), ((40.98303888993426 78.10904443800007, 40.98319444493425 78.11066943700007, 40.98342499993428 78.11216110500004, 40.98393611193424 78.11418332700003, 40.98457500093426 78.11586943800006, 40.98527222293425 78.11754443800004, 40.98577222293424 78.11845555000008, 40.98598888993427 78.11877499300003, 40.98631944493427 78.11908888300007, 40.98665000093426 78.11920277100006, 40.986888889934264 78.11914999400005, 40.9872138899343 78.11900277100005, 40.98761388993426 78.11856666100006, 40.987752778934286 78.11813332700007, 40.987822222934255 78.11766388200004, 40.98781666693429 78.11725832700007, 40.98777222293427 78.11654443800006, 40.98761388993426 78.11561666100006, 40.987347222934254 78.11464443800008, 40.98693611193424 78.11360277100005, 40.98643611193426 78.11258610400007, 40.985355555934284 78.11038332600003, 40.98474444493426 78.10925277100006, 40.98418333393428 78.10824721500006, 40.98381111193427 78.1078305490001, 40.98344166793428 78.10765554900006, 40.983216666934275 78.10764721600003, 40.98310277893424 78.10775277100004, 40.98302500093425 78.10789999300005, 40.98300833493424 78.10817777200003, 40.98303888993426 78.10904443800007)), ((40.9939055569343 78.16318610600007, 40.99411388993432 78.16435832800005, 40.99443055593431 78.16559166000008, 40.99466666793429 78.16655277200006, 40.99497777793433 78.16758610600004, 40.99539166793429 78.16841943900005, 40.9958805559343 78.16911388300008, 40.996341666934285 78.16941110600006, 40.996800000934314 78.16950554900006, 40.99723611193433 78.16943610600003, 40.99769444493431 78.16916666100009, 40.99800000093432 78.16862777300008, 40.99811944493432 78.16778610600005, 40.99811944493432 78.16708332800005, 40.9980638899343 78.16644999400008, 40.99785555593432 78.16548610600006, 40.99762222293433 78.16461943900003, 40.99730833393429 78.16368055000002, 40.99681944493431 78.16282221600005, 40.9960944449343 78.16165832800006, 40.99534722293433 78.16066110500003, 40.99483611193428 78.16006943800005, 40.99452777793434 78.15979999400008, 40.99424444593431 78.15980832700005, 40.99404166793428 78.16000832800006, 40.99388888893431 78.16044166100005, 40.9938444449343 78.16121666100008, 40.99385000093431 78.16208332700006, 40.9939055569343 78.16318610600007)))";
            //str="MULTIPOLYGON (((41.00000011596755 77.99999999388695, 41.00000011190918 78.05759711226416, 40.99943888993435 78.05906388200003), (40.99928888993434 78.05952221500007, 40.99918055593434 78.06055554800008, 40.999261111934324 78.06097221500006, 40.999427778934304 78.06148332600003, 40.99974722293432 78.06189165900008, 41.0000001115983 78.06200923054297, 41.000000108915046 78.10009050427283, 40.999522222934374 78.10106666000019, 40.99899722293444 78.10237777100008, 40.99853333393433 78.10401110400011, 40.99841111193432 78.1046444380001, 40.99839722293437 78.10520832600002, 40.998466667934316 78.10573888200008, 40.9985805559343 78.10598888300008, 40.99888055693439 78.10625832600005, 40.999141667934374 78.10628610400005, 40.99943888993446 78.10619721500007, 40.99969166793442 78.10599721500006, 40.99990555593438 78.10577221500006, 41.00000010852914 78.10556735372379, 41.00000010033296 78.22188909137476, 40.99909166793434 78.22034721700004, 40.99700555693429 78.21731666200003, 40.99575555693433 78.21511388400006, 40.99508333393432 78.21361110600003, 40.994647222934326 78.21221388400005, 40.9943999999343 78.21126666100008, 40.994180555934314 78.20978332800007, 40.992994445934315 78.20964443900004, 40.9916027789343 78.20899444000008, 40.989697222934296 78.20762221700005, 40.98764444493428 78.20539999500005, 40.98540277893424 78.20287221700005, 40.983588888934236 78.20085832800004, 40.982277778934275 78.19917499500008, 40.98168055593426 78.19772499500004, 40.981341666934235 78.19661388300005, 40.981297222934266 78.19559999500007, 40.98147500093423 78.19374999500006, 40.98146666693427 78.19273332900008, 40.98116666793427 78.19215277200004, 40.98086944493424 78.19177221700005, 40.98035277793425 78.19148332800005, 40.97968333393426 78.19139721700002, 40.97912222293423 78.19120555100007, 40.97875000093423 78.19082499500007, 40.978450000934245 78.19009443900006, 40.97825833393421 78.18908055000004, 40.97799444493421 78.18806388400003, 40.9776222229342 78.18734443900007, 40.97706111193424 78.18652777200003, 40.9767222229342 78.18594721700003, 40.97660555593421 78.18517499500007, 40.976841666934206 78.18418332800006, 40.97768333393424 78.18265555000005, 40.97830277793424 78.18153610500009, 40.97883611193426 78.18070277200007, 40.97959166693421 78.17952221700006, 40.98071944493424 78.17808055000006, 40.98202222293425 78.1765888830001, 40.98279444493422 78.17571943900003, 40.98358611193429 78.17423610600008, 40.984313889934285 78.17187499400006, 40.984875000934245 78.17018332800006, 40.98556388993424 78.16843888300006, 40.98620277893427 78.16735277300006, 40.98670555593428 78.16640555000004, 40.98709166693431 78.16560832700003, 40.98731388993428 78.16512221600004, 40.9876333339343 78.16434999400009, 40.98798055593426 78.16372499400006, 40.9878083339343 78.16308054900003, 40.987516667934294 78.16250832700007, 40.986930555934286 78.16226666100006, 40.98649722293429 78.16239721700003, 40.98577222293424 78.16284721700005, 40.98514444593427 78.16361943900006, 40.98406388993428 78.16598055000003, 40.98360555693425 78.16589443900007, 40.98334999993425 78.16590277200004, 40.98305000093424 78.16599721700005, 40.98257500093424 78.16624999400005, 40.98216944593425 78.16668332800003, 40.98198333393426 78.16707499500006, 40.98191388893426 78.16770832700007, 40.981844444934225 78.16834166100006, 40.98155277893423 78.16935832800006, 40.981188889934245 78.17043332700007, 40.98104166693425 78.17101666100007, 40.98097222293425 78.17135555000004, 40.98104722293428 78.17184166100003, 40.98112500093427 78.17203055100003, 40.98136388993427 78.17263888400004, 40.980955556934276 78.17318610600006, 40.980069444934216 78.17386388300008, 40.979180556934246 78.17436666100008, 40.97866666693422 78.17468888300006, 40.97773055593422 78.17570277200008, 40.97692222293421 78.17710832700004, 40.97603333393426 78.17874999500003, 40.97484444493419 78.18005277200005, 40.97410277793419 78.18058055000004, 40.97323333393422 78.18105832800006, 40.972722222934216 78.18139721600006, 40.97173611193418 78.18236110600003, 40.97107222293423 78.18280277300005, 40.9704527779342 78.18308055000006, 40.969786111934205 78.18314166100004, 40.969327777934176 78.18293332800005, 40.96886666793418 78.18233610600004, 40.96802500093419 78.18098888400004, 40.9668500009342 78.17882777300008, 40.96579444493415 78.17633610600006, 40.96216666793418 78.16811666100006, 40.961325000934146 78.16601666100007, 40.96078888893418 78.16411388400007, 40.96040000093413 78.16236110600005, 40.960113888934174 78.16062499500003, 40.959797222934164 78.15919166100008, 40.95948055593418 78.15842777200004, 40.95900555593412 78.15776943900005, 40.958455555934144 78.15721388400004, 40.95778611193416 78.15645832700005, 40.95719166693416 78.15544166000005, 40.956274999934145 78.15348054900005, 40.95544166793412 78.15126666000003, 40.95479722293414 78.14957499400003, 40.95426111193411 78.14811666100007, 40.953675000934155 78.14709999400003, 40.952691666934136 78.14564166100007, 40.95056111193411 78.14196943800003, 40.949283333934076 78.13976666100007, 40.94857777893411 78.13789999400007, 40.9480611119341 78.13578055000005, 40.94766111193409 78.13370554900007, 40.94744444593411 78.13148332700007, 40.94730000093407 78.12923610500007, 40.947330555934094 78.12775277200008, 40.94731666693409 78.12676110500007, 40.947119444934096 78.12571943800003, 40.94639444493411 78.12467777200004, 40.944905555934064 78.12303054900008, 40.9435638899341 78.12180555000002, 40.94298055593409 78.12082499400003, 40.94282222293408 78.12045277200008, 40.94274444493409 78.12000832700005, 40.942708334934096 78.11963610500004, 40.942730555934084 78.11879443800007, 40.942852777934064 78.11804721600004, 40.943022222934104 78.11722221600006, 40.94308055593406 78.11638054900004, 40.9430611119341 78.11580832700008, 40.9429555559341 78.11529443800005, 40.942713889934076 78.11479999400007, 40.942430556934035 78.11436666000003, 40.94182222293404 78.11378610500003, 40.941027778934036 78.11309999300005, 40.94046944593408 78.11227499400007, 40.93995277793408 78.11104999300005, 40.93933611193403 78.10950554900006, 40.93882500093406 78.10855832700008, 40.938102777934034 78.10776110500008, 40.93581666693404 78.10533054800004, 40.93439166693404 78.10370554900004, 40.931072222934034 78.0995222160001, 40.92941111193399 78.09721388200006, 40.927863888933985 78.09478332600008, 40.92679722293399 78.09251666000006, 40.925369444934 78.08854999400008, 40.92482222293398 78.08610277100007, 40.924313889934 78.0833944380001, 40.92386388993398 78.08101666000005, 40.92432222293398 78.08081666000004, 40.92476666693398 78.08060832600006, 40.92512500093398 78.08031388200003, 40.92533888993397 78.07993888100003, 40.925383333933986 78.07966943800005, 40.92533888993397 78.07944443700006, 40.925213889934 78.07925277100003, 40.924730555933984 78.07909721500005, 40.924172222933954 78.07900277100002, 40.923380555933974 78.07908054900008, 40.92296388993399 78.07631943700005, 40.92253888993399 78.07420277100005, 40.922138889933976 78.07198888200007, 40.92203888993399 78.07015554900006, 40.92206666693396 78.06820277100007, 40.92219166793397 78.06662221500004, 40.922702778934 78.06448888100005, 40.923055555933985 78.06298610400006, 40.92381944593397 78.05969721500003, 40.924458333934005 78.05683054800006, 40.92464722293396 78.05533888100007, 40.92467500093396 78.05376665900008, 40.92454444493397 78.05253610400007, 40.92408333393397 78.05074721500006, 40.923463889933984 78.04909721500007, 40.922452778933945 78.04634443700007, 40.92103611193395 78.04232777000004, 40.919644444934 78.03792499200006, 40.91911111193397 78.03601665800005, 40.918850000933965 78.03499999300004, 40.91872499993395 78.03392499300008, 40.918566666933955 78.03288332600005, 40.918169444933945 78.03161388100006, 40.91770833393395 78.03018332600004, 40.91724722293397 78.02874165800006, 40.917030555933934 78.02706665800008, 40.916811111933974 78.02555554700007, 40.916627778933965 78.02463610300002, 40.91637500093396 78.02406388100006, 40.91617222293395 78.02391388000007, 40.91578055593398 78.02388888100006, 40.91550833493392 78.02392499200005, 40.91522222293395 78.02416665900006, 40.91489722293392 78.02466943700006, 40.91450555593394 78.02546943700007, 40.913994444933955 78.02599721400003, 40.913547222933914 78.02631943600005, 40.913000000933934 78.02644165900006, 40.91253611193393 78.02644165900006, 40.912052778933955 78.02643332500007, 40.91165833393392 78.02630276900004, 40.91128611193391 78.02605832500006, 40.911050000933905 78.02573054700008, 40.910919445933914 78.02533054800006, 40.910850000933905 78.02482777000006, 40.910850000933905 78.02420277000004, 40.91089444493392 78.02381110300007, 40.91108611193395 78.02318610300006, 40.911597222933935 78.02236110300004, 40.912022222933935 78.02164999200005, 40.912361111933926 78.02076388100005, 40.91261666793393 78.02008610300004, 40.91289444493394 78.01948888000004, 40.91351666793395 78.01841110300006, 40.914422222933915 78.01709165900007, 40.91497777793393 78.01577221400004, 40.91529444493392 78.01414999200006, 40.91545277793393 78.01223888100003, 40.91552500093395 78.01075554800006, 40.91552222293393 78.00938332500004, 40.915511111933945 78.00736943600003, 40.915508333933936 78.00615554700006, 40.91563055593395 78.00489721400002, 40.91607777893394 78.00309999200005, 40.91636666793392 78.00000000100003, 40.91636666937166 77.99999999395231, 40.94988610835769 77.99999999392612, 40.949886110934116 78.00000000000004, 40.95072499993409 78.00168332500004, 40.95150277793413 78.00528610300005, 40.95183055593412 78.00866388100007, 40.95220555593409 78.01304721400004, 40.95230833393414 78.01606665900006, 40.95263333393411 78.01998332500004, 40.952824999934144 78.02276110300005, 40.95297222293414 78.02614721400005, 40.9527999999341 78.02792499200007, 40.95257777793411 78.02917499200004, 40.9518666679341 78.03184999200005, 40.95105000093412 78.03434165900006, 40.95071666793409 78.03546110300005, 40.9504638889341 78.03684999200004, 40.950555555934095 78.03834999300005, 40.95064722293409 78.04002499200004, 40.951119444934136 78.04285554800002, 40.952152778934135 78.04735277000003, 40.95262500093413 78.04985277000003, 40.95316944593413 78.05271666000006, 40.95365555593413 78.05463610400004, 40.95408333393414 78.05571943700005, 40.95445000093413 78.05642499300006, 40.95477499993411 78.05679721500007, 40.95512499993415 78.05691943700003, 40.95544722293415 78.05687499300006, 40.95573333393414 78.05661388100003, 40.955888889934116 78.05619721500005, 40.956008333934136 78.05523332500007, 40.95602777793415 78.05418332500007, 40.95604722293412 78.05318610400008, 40.95606388993412 78.05201388100005, 40.95608888993412 78.05084166000006, 40.95608611193411 78.05025277000004, 40.956127777934135 78.04987777100007, 40.956186110934105 78.04952221500008, 40.95630555693413 78.04923610300004, 40.95645000093415 78.04923610300004, 40.95654166793414 78.04934999300008, 40.95666666693412 78.04977499200002, 40.95679722293411 78.05076388100008, 40.95700555593415 78.05149443700003, 40.957208333934105 78.05198054800007, 40.95753888993411 78.05233610300009, 40.95790277893415 78.05244721400004, 40.95831944493412 78.05246666000005, 40.95857222293413 78.05238610400004, 40.95891111193417 78.05207499200003, 40.95916111193416 78.05164999300007, 40.959349999934126 78.0506333260001, 40.95954444493416 78.04791666000006, 40.959558333934154 78.04626665900008, 40.959419444934134 78.04394166000003, 40.95921111193416 78.04247499300004, 40.95895833393414 78.04055554800004, 40.95885833393417 78.03814165900008, 40.95890277893413 78.03676110300006, 40.95907222293416 78.03486943700005, 40.95922222293413 78.03256943600007, 40.95940000093415 78.02925276900002, 40.95961944493414 78.02659721400005, 40.960000000934116 78.02438332600008, 40.960441666934166 78.02268332500006, 40.96066111193413 78.02127499300008, 40.960994445934126 78.01968888100002, 40.96124166793417 78.01857777000002, 40.96148888993417 78.01747499200007, 40.96179166693417 78.01651110300008, 40.96219166793417 78.01553888100005, 40.961424999934195 78.01314165800004, 40.96034166793418 78.00970554700007, 40.95971666793415 78.00723888000005, 40.95948333393412 78.00545277000003, 40.95892500093416 78.00000000000004, 40.9589249992887 77.99999999391905, 41.00000011596755 77.99999999388695)), ((40.92412777893399 78.02394165900006, 40.92427499993396 78.02488610400009, 40.924622222933976 78.02597221400003, 40.92499444493397 78.02653610300005, 40.925516666934016 78.02705832500003, 40.92611944493398 78.02742221400008, 40.92672222293402 78.02756943600008, 40.927694444934 78.02751665900007, 40.92841111093401 78.02731665900005, 40.92976111193401 78.02662221400004, 40.93087777893403 78.02596388100005, 40.93161944493399 78.02542499200007, 40.93205000093401 78.02492221400007, 40.93239166693403 78.02431388100007, 40.932561111934 78.02359443600007, 40.93250000093402 78.02296110300004, 40.932269444934015 78.02228332500005, 40.93198333393403 78.02186665900005, 40.931580555934005 78.02150276900005, 40.93094722293401 78.02101665800006, 40.92988333393403 78.02058054700005, 40.928619444934 78.02040832600005, 40.927244444934 78.02050277000006, 40.92675277893396 78.02062499300007, 40.926094445933984 78.02071110300005, 40.92537777893397 78.02094721400005, 40.924777778934 78.02144165900006, 40.92443611193396 78.02178888100008, 40.924205555933995 78.02228332500005, 40.92409166793401 78.02296110300004, 40.92412777893399 78.02394165900006)), ((40.96888055593424 78.09316943700003, 40.96970833393433 78.09481666000016, 40.97029444493424 78.09580832700004, 40.9706555559342 78.09682221500009, 40.97087222293427 78.09756943700012, 40.97116666793417 78.0993499940001, 40.9714888899342 78.10078888200013, 40.97185000093433 78.10219721500005, 40.97251666793417 78.10388054900004, 40.97313333393423 78.10531388300019, 40.974369444934254 78.10837777200008, 40.97534722293419 78.11083332700015, 40.97598888993422 78.11269166100004, 40.97626666693424 78.11376666000012, 40.977213889934156 78.11625832700014, 40.97824722293433 78.11909721600011, 40.97919722293421 78.12209166100013, 40.98003055693427 78.12458332700004, 40.980933334934164 78.12829999400003, 40.98165000093436 78.13110277100004, 40.98262500093434 78.13443610600001, 40.98341111193432 78.13651110500001, 40.98451388993423 78.13894166100005, 40.98572500093438 78.14168332800017, 40.986930555934386 78.14529443800014, 40.98809444593439 78.14894999400008, 40.98891388893429 78.15091943800013, 40.989777778934354 78.15292499500009, 40.99061944593427 78.15432221700007, 40.99118611193427 78.15505277200003, 40.99157499993425 78.15523332700013, 40.991844444934266 78.15523332700013, 40.99208888993435 78.15506943900004, 40.99223611193424 78.154688883, 40.99247500093441 78.15391388300003, 40.992591666934295 78.1529527730001, 40.99278333393427 78.15202221600009, 40.99290000093443 78.15158055000012, 40.99324166693443 78.15122499400002, 40.99346388993423 78.15124999400011, 40.99368055593444 78.15140554900012, 40.994175000934405 78.15209999400012, 40.99497777893438 78.15399443900014, 40.99560000093433 78.15578055000003, 40.995847222934366 78.1563361050001, 40.99609444493441 78.15681388300015, 40.9963722229343 78.15701388299999, 40.99667500093429 78.15704999400009, 40.99698333393432 78.15700555000012, 40.99728611193431 78.1566833280001, 40.99758611193446 78.15591943900006, 40.997702778934446 78.15463610500012, 40.99766944493437 78.15383610600007, 40.997477778934275 78.15288332700004, 40.99695277893435 78.15140555000005, 40.996302777934346 78.14989721600011, 40.99537222293432 78.14795277200017, 40.99415833393432 78.14573054900006, 40.993497222934444 78.14428888300017, 40.992869444934364 78.14229999399998, 40.992452777934275 78.14030277200014, 40.99208888893441 78.137569439, 40.99149444593434 78.13546110499999, 40.990847222934356 78.13334999400007, 40.9903861119343 78.13209166100012, 40.98975277893442 78.13090277200007, 40.988849999934416 78.12979166000014, 40.987405555934224 78.1280916610001, 40.98648888893432 78.1274833280001, 40.98600277893426 78.12718888299997, 40.98556944493427 78.12686666100018, 40.98536388993424 78.12660554900003, 40.985202778934344 78.12594721600003, 40.98506944493429 78.12532221500008, 40.98470555593432 78.12421110499997, 40.984052777934295 78.1226999930002, 40.983458333934294 78.12164999400011, 40.98292222293427 78.1210249940001, 40.98235555593438 78.12040832700012, 40.98197500093423 78.11973054900017, 40.98124999993435 78.11788332800018, 40.980538888934255 78.11573888200002, 40.97949722293436 78.11325554900003, 40.97864722293417 78.11168332700015, 40.97764444493436 78.10951388300003, 40.9766666669343 78.1070499930001, 40.97598888993422 78.10527777100003, 40.97536944593434 78.10291666000012, 40.97483888993428 78.10122499300007, 40.974341667934176 78.09937499300014, 40.97383333393422 78.09664999400013, 40.97361666793425 78.09465277200015, 40.973419444934144 78.0913194380002, 40.97315555593426 78.08954999300005, 40.97286111193425 78.08804721500006, 40.97246666693421 78.08709999300002, 40.97132500093422 78.08506943800013, 40.97040277893429 78.0837166600001, 40.969866666934166 78.08268332600005, 40.96947500093429 78.08182221500016, 40.96896666793426 78.08061666000016, 40.968636111934266 78.07946110400007, 40.9684583339343 78.07769166000008, 40.9684638899342 78.07567777100013, 40.96857222293422 78.07393332600014, 40.968666667934265 78.07283888100012, 40.96860277793412 78.07198054800006, 40.9684638899342 78.07116388200012, 40.968188889934154 78.07038332600001, 40.96792500093427 78.06997499300007, 40.96766111193421 78.0699138820001, 40.96742500093428 78.0699138820001, 40.967216667934174 78.07012221500021, 40.96706944593428 78.07056388200004, 40.96682222293414 78.07146665900007, 40.96677222293426 78.07203054899998, 40.96660555593429 78.07295277000003, 40.96636388993415 78.07423610300003, 40.96620277793415 78.07545277100019, 40.96612777893427 78.0777611040001, 40.96618611193419 78.07901943800016, 40.96635555593418 78.08021666000008, 40.96661388893416 78.08120554800017, 40.96725277793416 78.0832888830002, 40.96769166793424 78.08504443800001, 40.96785555593432 78.08658054800014, 40.96786944493432 78.0876138820002, 40.96779444493412 78.08901943700005, 40.96780277893431 78.08986110400012, 40.96784166693431 78.09066943800002, 40.967930556934235 78.09119721500008, 40.96826388993419 78.09200554900019, 40.96888055593424 78.09316943700003)), ((40.97668888893435 78.09399443800015, 40.97688333393415 78.09517499400016, 40.97713888993416 78.09611943800013, 40.97769444493423 78.09717777100002, 40.97821944493433 78.0979611050002, 40.978863888934214 78.09877499400011, 40.97963055693419 78.09979166000005, 40.98000000093424 78.10014721600015, 40.980302778934245 78.10029443800005, 40.98054722293423 78.10029443700016, 40.98078611193433 78.10005277100004, 40.98089722293418 78.0995388820001, 40.9809500009343 78.09847221600012, 40.98092777893426 78.09681388200005, 40.98071666793427 78.09425277100013, 40.980394444934355 78.09229166000017, 40.97997500093432 78.09016388200013, 40.97950555693434 78.08867221500007, 40.97903611193431 78.08753610400015, 40.97801111193423 78.08533888200003, 40.97764444493436 78.0846694380001, 40.977336111934335 78.08448054899998, 40.977036111934176 78.08448888200007, 40.97679722293423 78.08476666000013, 40.97665277893418 78.0857111040001, 40.976619444934265 78.08772499400015, 40.97655000093419 78.08985277100004, 40.97656666793426 78.09123332700004, 40.97658055593434 78.09237777100009, 40.97668888893435 78.09399443800015)), ((40.98303888993426 78.10904443800007, 40.98319444493425 78.11066943700007, 40.98342499993428 78.11216110500004, 40.98393611193424 78.11418332700003, 40.98457500093426 78.11586943800006, 40.98527222293425 78.11754443800004, 40.98577222293424 78.11845555000008, 40.98598888993427 78.11877499300003, 40.98631944493427 78.11908888300007, 40.98665000093426 78.11920277100006, 40.986888889934264 78.11914999400005, 40.9872138899343 78.11900277100005, 40.98761388993426 78.11856666100006, 40.987752778934286 78.11813332700007, 40.987822222934255 78.11766388200004, 40.98781666693429 78.11725832700007, 40.98777222293427 78.11654443800006, 40.98761388993426 78.11561666100006, 40.987347222934254 78.11464443800008, 40.98693611193424 78.11360277100005, 40.98643611193426 78.11258610400007, 40.985355555934284 78.11038332600003, 40.98474444493426 78.10925277100006, 40.98418333393428 78.10824721500006, 40.98381111193427 78.1078305490001, 40.98344166793428 78.10765554900006, 40.983216666934275 78.10764721600003, 40.98310277893424 78.10775277100004, 40.98302500093425 78.10789999300005, 40.98300833493424 78.10817777200003, 40.98303888993426 78.10904443800007)), ((40.9939055569343 78.16318610600007, 40.99411388993432 78.16435832800005, 40.99443055593431 78.16559166000008, 40.99466666793429 78.16655277200006, 40.99497777793433 78.16758610600004, 40.99539166793429 78.16841943900005, 40.9958805559343 78.16911388300008, 40.996341666934285 78.16941110600006, 40.996800000934314 78.16950554900006, 40.99723611193433 78.16943610600003, 40.99769444493431 78.16916666100009, 40.99800000093432 78.16862777300008, 40.99811944493432 78.16778610600005, 40.99811944493432 78.16708332800005, 40.9980638899343 78.16644999400008, 40.99785555593432 78.16548610600006, 40.99762222293433 78.16461943900003, 40.99730833393429 78.16368055000002, 40.99681944493431 78.16282221600005, 40.9960944449343 78.16165832800006, 40.99534722293433 78.16066110500003, 40.99483611193428 78.16006943800005, 40.99452777793434 78.15979999400008, 40.99424444593431 78.15980832700005, 40.99404166793428 78.16000832800006, 40.99388888893431 78.16044166100005, 40.9938444449343 78.16121666100008, 40.99385000093431 78.16208332700006, 40.9939055569343 78.16318610600007)))";
            String[] splits1=str.split("\\(\\(\\(|\\)\\)\\)");
            String strDest="";
            if(splits1.length>=2){
                String[] splits2=splits1[splits1.length-1].split("\\)\\), \\(\\(");
                if(splits2.length>=2){
                    for(int m=0;m<splits2.length;m++){
                        String[] splits3=splits2[m].split("\\), \\(");
                        if(splits3.length>=2){
                            for(int j=0;j<splits3.length;j++) {
                                String[] splits4 = splits3[j].split(",");
                                if(splits4.length>0) {
                                    for (int i = 0; i < splits4.length; i++) {
                                        String[] splits5 = splits4[i].trim().split(" ");
                                        if (splits5.length == 2) {
                                            strDest += splits5[1] + " " + splits5[0] + ", ";
                                        }
                                    }
                                    strDest=strDest.substring(0,strDest.length()-2);
                                }
                                strDest+="), (";
                            }
                            strDest=strDest.substring(0,strDest.length()-4);//"), ("的长度
                            //strDest+=")), ((";
                        }else{
                            String[] splits4=splits3[0].split(",");
                            if(splits4.length>0) {
                                for (int i = 0; i < splits4.length; i++) {
                                    String[] splits5 = splits4[i].trim().split(" ");
                                    if (splits5.length == 2) {
                                        strDest += splits5[1] + " " + splits5[0] + ", ";
                                    }
                                }
                                strDest=strDest.substring(0,strDest.length()-2);
                            }
                        }
                        strDest+=")), ((";
                    }
                    strDest=strDest.substring(0,strDest.length()-6);//")), (("的长度
                }else{
                    String[] splits3=splits1[splits1.length-1].split("\\), \\(");
                    if(splits3.length>=2){
                        for(int j=0;j<splits3.length;j++) {
                            String[] splits4 = splits3[j].split(",");
                            if(splits4.length>0) {
                                for (int i = 0; i < splits4.length; i++) {
                                    String[] splits5 = splits4[i].trim().split(" ");
                                    if (splits5.length == 2) {
                                        strDest += splits5[1] + " " + splits5[0] + ", ";
                                    }
                                }
                                strDest=strDest.substring(0,strDest.length()-2);
                            }
                            strDest+="), (";
                        }
                        strDest=strDest.substring(0,strDest.length()-4);//"), ("的长度
                    }else{
                        //String[] splits4=splits1[splits1.length-1].split(",");//通过最初的数据进行经纬度分割
                        String[] splits4=splits2[0].split(",");
                        if(splits4.length>0) {
                            for (int i = 0; i < splits4.length; i++) {
                                String[] splits5 = splits4[i].trim().split(" ");
                                if (splits5.length == 2) {
                                    strDest += splits5[1] + " " + splits5[0] + ", ";
                                }
                            }
                            strDest=strDest.substring(0,strDest.length()-2);
                        }
                    }
                }
                strDest=splits1[0]+"((("+strDest+")))";
            }else {
                splits1 = str.split("\\(\\(|\\)\\)");
                if (splits1.length >= 2) {
                    String[] splits2 = splits1[splits1.length - 1].split("\\)\\), \\(\\(");
                    if (splits2.length >= 2) {
                        for (int m = 0; m < splits2.length; m++) {
                            String[] splits3 = splits2[m].split("\\), \\(");
                            if (splits3.length >= 2) {
                                for (int j = 0; j < splits3.length; j++) {
                                    String[] splits4 = splits3[j].split(",");
                                    if (splits4.length > 0) {
                                        for (int i = 0; i < splits4.length; i++) {
                                            String[] splits5 = splits4[i].trim().split(" ");
                                            if (splits5.length == 2) {
                                                strDest += splits5[1] + " " + splits5[0] + ", ";
                                            }
                                        }
                                        strDest = strDest.substring(0, strDest.length() - 2);
                                    }
                                    strDest += "), (";
                                }
                                strDest = strDest.substring(0, strDest.length() - 4);//"), ("的长度
                                //strDest+=")), ((";
                            } else {
                                String[] splits4 = splits3[0].split(",");
                                if (splits4.length > 0) {
                                    for (int i = 0; i < splits4.length; i++) {
                                        String[] splits5 = splits4[i].trim().split(" ");
                                        if (splits5.length == 2) {
                                            strDest += splits5[1] + " " + splits5[0] + ", ";
                                        }
                                    }
                                    strDest = strDest.substring(0, strDest.length() - 2);
                                }
                            }
                            strDest += ")), ((";
                        }
                        strDest = strDest.substring(0, strDest.length() - 6);//")), (("的长度
                    } else {
                        String[] splits3 = splits1[splits1.length - 1].split("\\), \\(");
                        if (splits3.length >= 2) {
                            for (int j = 0; j < splits3.length; j++) {
                                String[] splits4 = splits3[j].split(",");
                                if (splits4.length > 0) {
                                    for (int i = 0; i < splits4.length; i++) {
                                        String[] splits5 = splits4[i].trim().split(" ");
                                        if (splits5.length == 2) {
                                            strDest += splits5[1] + " " + splits5[0] + ", ";
                                        }
                                    }
                                    strDest = strDest.substring(0, strDest.length() - 2);
                                }
                                strDest += "), (";
                            }
                            strDest = strDest.substring(0, strDest.length() - 4);//"), ("的长度
                        } else {
                            //String[] splits4=splits1[splits1.length-1].split(",");//通过最初的数据进行经纬度分割
                            String[] splits4 = splits2[0].split(",");
                            if (splits4.length > 0) {
                                for (int i = 0; i < splits4.length; i++) {
                                    String[] splits5 = splits4[i].trim().split(" ");
                                    if (splits5.length == 2) {
                                        strDest += splits5[1] + " " + splits5[0] + ", ";
                                    }
                                }
                                strDest = strDest.substring(0, strDest.length() - 2);
                            }
                        }
                    }
                    strDest = splits1[0] + "((" + strDest + "))";
                }
            }

            return strDest;
        }
        catch (Exception e) {
            e.printStackTrace();
            return null;
        }
    }

    public static String wktPolygon2Lonlat (String wktPolygon){
        Geometry geomtry = null;
        String dest="";
        try {
            geomtry = reader.read(wktPolygon);
            dest = ProjectTransUtil.webMactor2LonlatEx(geomtry);
        } catch (ParseException e) {
            e.printStackTrace();
        }
        return dest;
        /*if (geomtry != null)
            return geomtry.toString();
        else return null;*/
    }

  /*  public static String wktPolygon2coordinates (String wktPolygon){
        StringBuilder result = new StringBuilder();
        try{
            Geometry geomtry = reader.read(wktPolygon);
            geomtry = ProjectTransUtil.webMactor2Lonlat(geomtry);
            String str = "";
            int geoCount = geomtry.getNumGeometries();
            for (int idx = 0;idx < geoCount;idx++) {
                Geometry geo = geomtry.getGeometryN(idx);
                Coordinate[] coords = geo.getCoordinates();
                StringBuilder stringBuilder = new StringBuilder();
                for (Coordinate coord : coords) {
                    stringBuilder.append(coord);
                }
                str = stringBuilder.toString().replace(")(", " ");
                str = str.substring(1, str.length() - 1) + "|";
                result.append(str);
            }
        }
        catch (Exception e) {
            e.printStackTrace();
            return "";
        }
        return result.toString();
    }*/


    public static String parseWktPolygon (String wktPolygon) {
        StringBuilder result = new StringBuilder();
        try{
            Geometry geomtry = reader.read(wktPolygon);
            String str;
            int count = geomtry.getNumGeometries();
            for (int idx = 0;idx < count;idx++) {
                Geometry geo = geomtry.getGeometryN(idx);
                Coordinate[] coords = geo.getCoordinates();
                StringBuilder stringBuilder = new StringBuilder();
                for (Coordinate coord : coords) {
                    stringBuilder.append(coord);
                }
                str = stringBuilder.toString().replace(")(", " ");
                str = str.replace(", ", ",");
                str = str.substring(1, str.length() - 1) + "|";
                result.append(str);
            }
        }
        catch (Exception e) {
            e.printStackTrace();
            return "";
        }
        return result.toString();
    }

    public static String wktPolygon2coordinates (String wktPolygon){
        StringBuilder result = new StringBuilder();
        try{
            Geometry geomtry = reader.read(wktPolygon);
            geomtry = ProjectTransUtil.webMercator2lonLat(geomtry);
            String str = "";
            int geoCount = geomtry.getNumGeometries();
            for (int idx = 0;idx < geoCount;idx++) {
                Geometry geo = geomtry.getGeometryN(idx);
                Coordinate[] coords = geo.getCoordinates();
                StringBuilder stringBuilder = new StringBuilder();
                for (Coordinate coord : coords) {
                    stringBuilder.append(coord);
                }
                str = stringBuilder.toString().replace(")(", " ");
                str = str.substring(1, str.length() - 1) + "|";
                result.append(str);
            }
        }
        catch (Exception e) {
            e.printStackTrace();
            return "";
        }
        return result.toString();
    }

    public static Geometry webMercator2lonLat(Geometry geom){
        try{
            CoordinateReferenceSystem sourceTarget = CRS.parseWKT(strWKTMercator);
            System.out.println(sourceTarget.getName());
            CoordinateReferenceSystem crsTarget = CRS.decode("EPSG:4490");
            MathTransform transform = CRS.findMathTransform(sourceTarget, crsTarget, true);
            //MathTransform transform = CRS.findMathTransform(sourceTarget, DefaultGeographicCRS.WGS84, true);
            return JTS.transform(geom, transform);
        }
        catch (Exception e) {
            e.printStackTrace();
            return null;
        }
    }

    public static void main(String[] args){

       String wktPolygon = "POLYGON ((-507925.35009999946 3766378.3257, -500728.66899999976 3778291.655099999, -496283.6601999998 3785117.9187000003, -490727.3990000002 3792102.9327000007, -485171.1378999986 3799405.4473, -480884.8794 3802421.7032999992, -474534.86670000106 3807184.2128999997, -469296.1061999984 3810359.2192, -453738.57510000095 3817502.9835, -438816.04520000145 3821947.9924, -425481.01850000024 3825599.2497000005, -403414.7243999988 3830838.0101999994, -393572.2047000006 3832743.0140000004, -379125.9257999994 3835283.019099999, -363250.8940999992 3837346.7731999997, -355630.878800001 3838458.0253999997, -343248.3541000001 3840363.0292000007, -335787.0892000012 3840839.280200001, -310387.0384000018 3840839.280200001, -286415.7404000014 3838934.2764, -273080.7137000002 3837823.0241, -248156.9138999991 3831314.2611, -236568.14070000127 3827980.5045, -218311.8542000018 3821947.9924, " +
                "-193335.13760000095 3810828.4146, -188360.9609999992 3808235.4926999994, -177936.35680000111 3802467.5645000003, -168781.75510000065 3797493.3879000004, -156028.813000001 3789979.2062, -145445.45850000158 3782994.1922999993, -138936.6955000013 3778496.2665999997, -129094.17579999939 3770400.0003999993, -125495.83520000055 3766219.5754000004, -120098.32440000027 3759128.7279000003, -116394.15040000156 3752884.548699999, -113536.6446999982 3746640.3696, -111367.05700000003 3740396.1904000007, -109620.80350000039 3732776.1752000004, -108403.71770000085 3724679.909, -106710.38100000098 3712085.7171, -106339.9635999985 3707905.2920999993, -105757.87909999862 3698062.772399999, -105175.79459999874 3689913.5894, -105599.128800001 3684727.7457, -106551.63069999963 3677954.3987999996, -106974.96489999816 3672133.5538999997, -107292.46550000086 3667053.5437000003, -107451.21579999849 3665836.4579, -108350.80099999905 3661814.7832000004, -110361.63830000162 3652871.8487, -111578.72410000116 3647421.4211, " +
                "-113272.06080000103 3641653.4929, -115441.6484999992 3634456.8119, -118934.15549999848 3625831.3778999997, -124384.58300000057 3616253.4420999996, -130681.67889999971 3605934.6715, -135179.60460000113 3599372.9917, -140312.5315000005 3592282.1442, -148461.71449999884 3584820.8792000003, -155922.97940000147 3577730.0317, -162643.40949999914 3574502.1086, -167723.41970000044 3571856.2699999996, -178095.10709999874 3568840.0140000004, -185768.03909999877 3567358.3443, -198415.14770000055 3567040.8437, -208575.16809999943 3567887.512, -218311.8542000018 3569210.4314, -228524.79129999876 3570427.5171, -240642.73220000044 3572755.8551000003, -245934.40949999914 3573549.6067000004, -253236.9241000004 3574819.6092, -258634.4349000007 3575877.9447, -261386.10700000077 3576671.6963, -265936.94949999824 3578206.2827000003, -271969.4615000002 3580111.2865000004, -281282.8134999983 3582968.7922, -307370.78229999915 3591329.6423000004, -326262.07009999827 3597362.1542999996, -345047.52430000156 3604082.5844, " +
                "-362192.55860000104 3610591.3475, -369653.82360000163 3613448.8532, -381083.84640000015 3617364.6942999996, -404737.6436999999 3625143.4599, -424422.6831 3631599.3060999997, -447706.063000001 3639801.4058999997, -468502.3546000011 3646945.1701999996, -488187.39400000125 3654406.4351000004, -499088.24909999967 3659063.1111000003, -513164.1105999984 3666630.2095, -520995.79289999977 3672768.5551000005, -526075.8031000011 3678324.8163, -528668.7248999998 3683775.2438000003, -532319.9822000004 3691924.4267999995, -532214.1486999989 3697533.604699999, -531684.9809999987 3703619.033500001, -531261.6468000002 3706529.4560000002, -528562.8913999982 3715049.056399999, -524964.5507999994 3726849.4966, -520307.8748999983 3737432.8510999996, -517873.70329999924 3742936.1954999994, -514328.27959999815 3751349.9623000007, -512370.3590000011 3756429.9725, -507925.35009999946 3766378.3257))";

        //String wktPolygon = "MULTIPOLYGON (((-507925.35009999946 3766378.3257, -500728.66899999976 3778291.655099999, -496283.6601999998 3785117.9187000003, -490727.3990000002 3792102.9327000007, -485171.1378999986 3799405.4473, -480884.8794 3802421.7032999992, -474534.86670000106 3807184.2128999997, -469296.1061999984 3810359.2192, -453738.57510000095 3817502.9835, -438816.04520000145 3821947.9924, -425481.01850000024 3825599.2497000005, -403414.7243999988 3830838.0101999994, -393572.2047000006 3832743.0140000004, -379125.9257999994 3835283.019099999, -363250.8940999992 3837346.7731999997, -355630.878800001 3838458.0253999997, -343248.3541000001 3840363.0292000007, -335787.0892000012 3840839.280200001, -310387.0384000018 3840839.280200001, -286415.7404000014 3838934.2764, -273080.7137000002 3837823.0241, -248156.9138999991 3831314.2611, -236568.14070000127 3827980.5045, -218311.8542000018 3821947.9924, -193335.13760000095 3810828.4146, -188360.9609999992 3808235.4926999994, -177936.35680000111 3802467.5645000003, -168781.75510000065 3797493.3879000004, -156028.813000001 3789979.2062, -145445.45850000158 3782994.1922999993, -138936.6955000013 3778496.2665999997, -129094.17579999939 3770400.0003999993, -125495.83520000055 3766219.5754000004, -120098.32440000027 3759128.7279000003, -116394.15040000156 3752884.548699999, -113536.6446999982 3746640.3696, -111367.05700000003 3740396.1904000007, -109620.80350000039 3732776.1752000004, -108403.71770000085 3724679.909, -106710.38100000098 3712085.7171, -106339.9635999985 3707905.2920999993, -105757.87909999862 3698062.772399999, -105175.79459999874 3689913.5894, -105599.128800001 3684727.7457, -106551.63069999963 3677954.3987999996, -106974.96489999816 3672133.5538999997, -107292.46550000086 3667053.5437000003, -107451.21579999849 3665836.4579, -108350.80099999905 3661814.7832000004, -110361.63830000162 3652871.8487, -111578.72410000116 3647421.4211, -113272.06080000103 3641653.4929, -115441.6484999992 3634456.8119, -118934.15549999848 3625831.3778999997, -124384.58300000057 3616253.4420999996, -130681.67889999971 3605934.6715, -135179.60460000113 3599372.9917, -140312.5315000005 3592282.1442, -148461.71449999884 3584820.8792000003, -155922.97940000147 3577730.0317, -162643.40949999914 3574502.1086, -167723.41970000044 3571856.2699999996, -178095.10709999874 3568840.0140000004, -185768.03909999877 3567358.3443, -198415.14770000055 3567040.8437, -208575.16809999943 3567887.512, -218311.8542000018 3569210.4314, -228524.79129999876 3570427.5171, -240642.73220000044 3572755.8551000003, -245934.40949999914 3573549.6067000004, -253236.9241000004 3574819.6092, -258634.4349000007 3575877.9447, -261386.10700000077 3576671.6963, -265936.94949999824 3578206.2827000003, -271969.4615000002 3580111.2865000004, -281282.8134999983 3582968.7922, -307370.78229999915 3591329.6423000004, -326262.07009999827 3597362.1542999996, -345047.52430000156 3604082.5844, -362192.55860000104 3610591.3475, -369653.82360000163 3613448.8532, -381083.84640000015 3617364.6942999996, -404737.6436999999 3625143.4599, -424422.6831 3631599.3060999997, -447706.063000001 3639801.4058999997, -468502.3546000011 3646945.1701999996, -488187.39400000125 3654406.4351000004, -499088.24909999967 3659063.1111000003, -513164.1105999984 3666630.2095, -520995.79289999977 3672768.5551000005, -526075.8031000011 3678324.8163, -528668.7248999998 3683775.2438000003, -532319.9822000004 3691924.4267999995, -532214.1486999989 3697533.604699999, -531684.9809999987 3703619.033500001, -531261.6468000002 3706529.4560000002, -528562.8913999982 3715049.056399999, -524964.5507999994 3726849.4966, -520307.8748999983 3737432.8510999996, -517873.70329999924 3742936.1954999994, -514328.27959999815 3751349.9623000007, -512370.3590000011 3756429.9725, -507925.35009999946 3766378.3257)))";
        //String wktPolygon = "MULTIPOLYGON (((89118.76289999858 3831353.6537999995, 91447.10080000013 3833787.8254000004, 94357.52329999954 3837068.6653000005, 95521.6922999993 3837756.5833, 99649.20059999824 3840084.9212999996, 102347.95600000024 3840931.5897000004, 106581.29780000076 3841460.7574000005, 110973.3898999989 3841460.7574000005, 118064.23739999905 3840402.4219000004, 119175.48959999904 3839608.6702999994, 120657.15929999948 3838867.8355, 122244.6623999998 3838391.5845999997, 125260.91849999875 3836856.9981999993, 127430.50609999895 3834581.5769999996, 129494.26029999927 3830824.4860999994, 130764.26280000061 3828601.9816999994, 132457.59950000048 3824633.2237, 133515.93499999866 3821987.3850999996, 134733.0207999982 3816536.9574999996, 137960.9439000003 3803307.7643999998, 139707.19739999995 3797010.6685000006, 140395.1154000014 3794841.0808000006, 141135.95019999892 3792089.4086000007, 141400.53409999982 3791083.99, 142829.28689999878 3786691.8978000004, 143675.95529999956 3783463.9747, 145263.45850000158 3777537.2961999997, 146215.96040000021 3776055.626599999, 149920.13450000063 3766848.1082000006, 151825.13830000162 3761715.1811999995, 154100.55950000137 3755365.1685000006, 155635.1458999999 3749808.907400001, 156534.73099999875 3748327.2378000002, 159339.3200000003 3742982.6437999997, 162461.40949999914 3736632.631100001, 166906.41840000078 3728748.0319999997, 175426.0188000016 3720493.0154999997, 183046.03400000185 3712396.7492999993, 189607.71379999816 3704247.566299999, 192359.38599999994 3698585.4716, 193364.80469999835 3695304.6317, 194952.30790000036 3689589.6202999996, 195746.05939999968 3684615.4436999997, 196381.06069999933 3682075.4386, 196169.3935999982 3680276.2684000004, 195957.7265000008 3676625.011, 195640.22590000182 3670327.9151, 195269.80849999934 3668528.7449000003, 192623.96990000084 3661914.1482999995, 190824.79960000142 3658262.891, 184210.2030000016 3646832.8680999996, 181670.19799999893 3644345.7797999997, 178918.52580000088 3641752.858, 173573.93180000037 3637572.4329000004, 160662.2393000014 3629158.6661, 151348.8872999996 3623549.4881999996, 143675.95529999956 3620004.0645000003, 128012.59059999883 3612860.3002000004, 125895.91970000044 3612119.4654, 113460.47819999978 3607621.5396999996, 103459.20820000023 3604023.1991999997, 88377.92799999937 3600213.1915999996, 76947.90520000085 3599260.6897, 67740.38679999858 3602911.9469999997, 62977.87719999999 3613177.8008000003, 62872.04369999841 3614236.1363000004, 63030.79399999976 3619316.1464, 62713.29340000078 3629846.5842000004, 62660.37660000101 3635349.9285000004, 63136.62759999931 3643922.4456, 63454.12819999829 3649425.79, 64194.96299999952 3658897.8923000004, 64300.79659999907 3664612.9036999997, 64829.96429999918 3668793.3287000004, 65200.38170000166 3671915.4183, 65729.54940000176 3679958.7676999997, 66417.46750000119 3686732.1146, 67369.96939999983 3696204.2169000003, 68428.30480000004 3708851.3255000003, 68692.88870000094 3712925.9169999994, 69274.97320000082 3719328.8465, 70068.72480000183 3725414.2753, 70227.47509999946 3729330.1164999995, 70439.14220000058 3731446.7874, 70756.64279999956 3735468.462099999, 71179.97700000182 3737532.2161999997, 71603.31120000035 3741395.1405999996, 72661.64660000056 3747004.318499999, 73190.81430000067 3751978.495100001, 73719.98209999874 3756688.0878, 74884.1510999985 3764678.5205000006, 75783.73620000109 3773039.3705, 76736.23809999973 3781294.3871, 77000.82200000063 3783463.9747, 77794.57349999994 3789496.4868, 78006.24060000107 3791560.2409000006, 78747.07539999858 3795581.9156, 79170.40960000083 3798280.671, 79911.24439999834 3803466.5146999992, 81445.83080000058 3811351.1138000004, 82027.91530000046 3814737.7873, 83086.25079999864 3820082.3813000005, 83668.33529999852 3820876.1328999996, 84303.33659999818 3822516.5527999997, 85996.67330000177 3826273.6437, 87055.00869999826 3828178.647500001, 88325.0113000013 3829766.150699999, 89118.76289999858 3831353.6537999995)))";
        //String wktPolygon = "MULTIPOLYGON (((1140196.1308999993 3832937.4856000002, 1152080.5324999988 3837468.5724, 1166844.311999999 3842231.0819000006, 1169754.7344999984 3842442.749, 1190974.3603000008 3843712.751599999, 1199811.4613000005 3843765.668299999, 1201557.7148000002 3843554.0012, 1205208.9721000008 3843130.6670999993, 1207748.9770999998 3842866.0832, 1211558.9847999997 3842495.6657999996, 1213728.5724 3842178.1652000006, 1215739.4098000005 3841543.163899999, 1219919.8348000012 3840220.2446, 1236800.2851999998 3835140.2344000004, 1244579.0507999994 3830801.0591, 1252569.4835 3824768.5470000003, 1255321.1556000002 3819106.452299999, 1258919.496199999 3809084.0155999996, 1259399.9803999998 3796756.5242999997, 1259611.647500001 3789009.5088, 1260094.9541000016 3770760.277899999, 1258412.2007 3760505.0074000005, 1256919.9477000013 3752757.9919000007, 1255829.8621999994 3742386.3045000006, 1254348.1926000006 3728257.5262, 1252813.6061999984 3719314.5917000007, 1250485.268199999 3704550.8121000007, 1250114.8508000001 3702910.3922000006, 1248527.3476000018 3697936.2156000007, 1244029.4219000004 3684019.1043999996, 1241595.2503999993 3675605.3376, 1237256.075100001 3663381.5631, 1229900.6437 3643643.607, 1217253.5350000001 3627345.2410000004, 1213655.1944999993 3622582.7314999998, 1205347.2611999996 3617555.6381, 1203759.7580999993 3617132.3039999995, 1200478.9182000011 3616656.0530000003, 1192065.1512999982 3615174.3833999997, 1185080.1374000013 3614433.5486000003, 1172327.1952 3613481.0467, 1167564.6856999993 3613533.9634, 1145445.4748000018 3614751.0492000002, 1134608.1198000014 3617333.3877, 1129993.7771999985 3618391.7231, 1126564.770300001 3619280.7249, 1119283.4224000014 3628890.4107999997, 1113737.7446999997 3637822.762, 1112213.7415999994 3643453.1065999996, 1109927.7371000014 3651792.7899, 1108446.067400001 3657169.1339999996, 1106117.7294000015 3664831.4826999996, 1105059.3940000013 3671181.4954000004, 1103408.3907000013 3682018.8504, 1102223.0549999997 3689892.8661, 1101418.7199999988 3695184.543400001, 1101207.0529999994 3699544.885399999, 1100995.3858999982 3708985.2377000004, 1100656.7184999995 3717705.9218000006, 1100953.0524000004 3724775.602600001, 1101545.7203000002 3732353.2843999993, 1102434.7221000008 3741751.303200001, 1103112.0568000004 3749074.9845000003, 1104043.392000001 3756440.9991999995, 1105440.3948 3767024.353700001, 1107938.066399999 3775406.3705, 1110901.4056999981 3786328.3923000004, 1111536.4068999998 3787556.0615, 1113483.7441999987 3792297.4043000005, 1116658.750500001 3799663.4189999998, 1122797.0960999988 3812659.7783000004, 1124575.0997000001 3815284.4503000006, 1129909.1103999987 3821719.1297999993, 1133676.7846000008 3826291.1389000006, 1136597.7903999984 3829127.4779000003, 1140196.1308999993 3832937.4856000002)), " +
        //"((89118.76289999858 3831353.6537999995, 91447.10080000013 3833787.8254000004, 66417.46750000119 3686732.1146, 89118.76289999858 3831353.6537999995)))";

        String test="MULTILINESTRING ((116.22032356208274 39.81873654265735, 116.22023586289481 39.81810765844176, 116.22014514378338 39.8174793174166, 116.22005140474857 39.81685151868271, 116.21995464579038 39.816224263139304, 116.21985486690869 39.81559754988706, 116.21975206900288 39.81497137982535, 116.21964625117357 39.81434575205486, 116.21953741432026 39.813720667474854, 116.21942555844282 39.813096125186064, 116.219310682642 39.81247212608781, 116.21919278781695 39.81184866928072, 116.21907187396789 39.81122575566417, 116.21894794109471 39.810603384338776, 116.21882098919741 39.80998155620392, 116.21869101827599 39.80936027036023, 116.21855802922971 39.808739527707075, 116.21842202026005 39.80811932734514, 116.21828299406502 39.807499670173684, 116.2181409479465 39.80688055439413, 116.21799588460249 39.80626198270437, 116.21784780223436 39.80564395330583, 116.21769670174149 39.80502646619851, 116.21754258312376 39.804409521382354, 116.21738544548202 39.80379311975673, 116.21722529061469 39.803177260422274, 116.21706211762273 39.80256194427835, 116.21689592650591 39.80194717042565, 116.21672671726424 39.80133293886411, 116.2165544907972 39.800719249593726, 116.21637924620529 39.80010610351394, 116.21620098438802 39.79949349972526, 116.21601970534516 39.79888143822785, 116.21577763842731 39.79807705671084, 116.21553722895999 39.79728985584222, 116.21529799220866 39.79651825281519, 116.21505954506199 39.79576101196119, 116.21482146483879 39.795016797787014, 116.21458353839967 39.79428495108965, 116.21434550134393 39.79356465798264, 116.2141071306396 39.79285524667233, 116.21386788579434 39.7921551289561, 116.21362791879346 39.79146478147453, 116.2133870641618 39.790783720392426, 116.21314517261169 39.790111532021626, 116.21290208676191 39.78944777569433, 116.21265770408979 39.78879217262073, 116.21241190588478 39.7881444089374, 116.21216458872482 39.787504208552434, 116.21191461047101 39.78686868913877, 116.21166290911606 39.78624030404683, 116.21140939562713 39.785618834741456, 116.21115399086409 39.78500408427112, 116.2108966084918 39.784395849389, 116.21063718825565 39.783793982606255, 116.21037566000871 39.783198327440914, 116.21011196259701 39.78260874000142, 116.20984598180667 39.78202496847757, 116.20957771224164 39.781447007473446, 116.20930709994275 39.78087474007725, 116.20903409454786 39.780308056571585, 116.20875864119841 39.77974684723927, 116.20848069942485 39.77919102574532, 116.20820022156306 39.77864050125817, 116.20791716624433 39.77809519014096, 116.20758363287837 39.777465969578884, 116.2072407807375 39.77683370301304, 116.20688852348667 39.776198229464796, 116.20652676309965 39.775559372666976, 116.20615540874519 39.77491696804367, 116.20577433002143 39.77427079076443, 116.20538340102325 39.773620627689866, 116.20498247965782 39.77296623870103, 116.20457160729393 39.77230768405241, 116.20415042240415 39.77164437558753, 116.20371873792942 39.77097601652997, 116.20327633533464 39.7703022696341, 116.20282301946679 39.7696228336269, 116.20235848095922 39.76893724355898, 116.20188242393476 39.76824506056113, 116.2013944985573 39.76754577741576, 116.20090182925605 39.76684938199344, 116.20039683744415 39.76614494933, 116.19987904468223 39.76543181122918, 116.1993478727062 39.76470916909295, 116.19880284487544 39.763976370912815, 116.19824300521054 39.76323212346375, 116.19766745978552 39.76247523874133, 116.19707506016596 39.76170420408579, 116.19646971930217 39.76092401253322, 116.19584481458662 39.76012603149121, 116.19519836571203 39.75930772936829, 116.19452755060604 39.75846552956057, 116.1938313359475 39.75759809927291, 116.19310228883967 39.75669613861595, 116.19233381545325 39.75575148264488, 116.19151339902419 39.7547487349662, 116.19089619160604 39.75399015771967, 116.19022487647692 39.753153099336146, 116.18944919952105 39.752174704399124, 116.18779758289224 39.75007614269987, 116.18707333906343 39.749160299208484, 116.18630333323233 39.74819659289852, 116.185947975119 39.747756665237944, 116.18560618957406 39.74733700649773, 116.18519086376739 39.74683218016105, 116.18478868964633 39.74634926220875, 116.18439680646748 39.7458848217272, 116.18401333734573 39.745436634692965, 116.18363617876673 39.74500225764814, 116.1832646913125 39.74458097023563, 116.18289785605123 39.74417161502805, 116.18253489057281 39.743773321481626, 116.18211768608239 39.743324051663706, 116.18170387383475 39.74288769880832, 116.18129267771496 39.742463442733765, 116.1808834690969 39.74205063772678, 116.18047556449574 39.74164859850407, 116.18006860058551 39.74125696983333, 116.17966213489967 39.74087532903326, 116.17925579421956 39.740503322670236, 116.17884870170633 39.740140170132804, 116.17844107859298 39.739786084560194, 116.17803263709663 39.73944081773959, 116.17762312630634 39.73910415743097, 116.17721227462687 39.738775881501795, 116.17679990039517 39.73845584695982, 116.17638580126379 39.73814389462507, 116.17596979467032 39.737839889599286, 116.17548209412337 39.737492525559674, 116.1749881837577 39.73714783250654, 116.17448830369233 39.7368059804117, 116.17398269584476 39.73646713205255, 116.17347160573013 39.73613145380358, 116.17295527616511 39.73579910304625, 116.17243395266485 39.73547023985975, 116.1719078816435 39.73514501892754, 116.17137734189089 39.73482361112082, 116.17084254744566 39.73450614594191, 116.17030374652074 39.7341927708797, 116.16976118283242 39.73388362802706, 116.1692151072914 39.733578859476836, 116.16866575641961 39.733278598328695, 116.16811337303375 39.73298297498434, 116.16755819455511 39.732692119845524, 116.16700086849539 39.73240636206401, 116.16644122398338 39.73212560811038, 116.16587949124562 39.7318499757958, 116.16531590050852 39.73157957483755, 116.16475068289776 39.7313145176509, 116.16418405425077 39.73105490585925, 116.16361623310274 39.73080083838801, 116.16304743529099 39.73055241236398, 116.16247793061211 39.73030974559833, 116.16190786745415 39.73007289924493, 116.16133744906404 39.72984195784011, 116.16076687419195 39.72961700232287, 116.1601963460846 39.72939811183346, 116.15962604640492 39.72918535741837, 116.15905616311147 39.728978809224714, 116.15848687786718 39.72877853200367, 116.15809022288556 39.728643501496435, 116.15768729962929 39.72851110510345, 116.15727791564336 39.728381278073584, 116.15686185419133 39.72825395205831, 116.15643891922082 39.728129065903715, 116.15600880676106 39.72800652967766, 116.15557122902908 39.72788626154181, 116.15512585237627 39.727768169765284, 116.1546729753776 39.7276523226966, 116.15421153413502 39.72753844064658, 116.15374106190052 39.72742640760271, 116.15326099749711 39.72731608956593, 116.15277088047185 39.72720737861766, 116.1522697998115 39.72710007061181, 116.1517569065561 39.72699398388528, 116.15123111792184 39.72688889360762, 116.15080601468594 39.726806452755625, 116.15037131568374 39.726724326666385, 116.14992614497567 39.7266423489653, 116.1494693604227 39.7265603101103, 116.1490002137889 39.726478070706435, 116.14851638032678 39.72639522066294, 116.14749514708342 39.72622606807863, 116.14656744153422 39.72607797222071, 116.14553451350707 39.72591775979686, 116.14451697377933 39.72576318971949, 116.1419084281315 39.72537078943043, 116.14047688280198 39.72515054995796, 116.13972020042695 39.725030730583796, 116.1390140005957 39.724916002271755, 116.13834504888496 39.72480421294415, 116.13770655721191 39.72469422495857, 116.1360543227488 39.72440785383941, 116.13440055853903 39.72412680131089, 116.13274526548173 39.72385106827221, 116.13108844267754 39.72358065292485, 116.12943009102594 39.72331555706734, 116.12777020872818 39.72305577890114, 116.12610879578438 39.72280131932547, 116.12444585129504 39.722552178340436, 116.12278137615965 39.72230835504661, 116.12111536947873 39.72206985034336, 116.1194478312525 39.72183666423075, 116.1177787596821 39.721608795809345, 116.1161081556669 39.7213862450792, 116.114436019207 39.72116901204032, 116.11276234850368 39.72095709759202, 116.11108714445618 39.72075050083498))";
        try {
            long start = System.currentTimeMillis();

            String coords = ProjectTransUtil.wktPolygon2coordinates(test);
            System.out.println("coords: ");
            System.out.println(coords);

            System.out.println("坐标转换完成，共耗时"+(System.currentTimeMillis() - start)+"ms");
        }
        catch (Exception e) {
            e.printStackTrace();
        }
    }


}
